diff options
| author | Joakim Verona | 2011-10-10 13:00:51 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-10-10 13:00:51 +0200 |
| commit | 0b19c7867f5e647fa0269833fe74e0064b415c08 (patch) | |
| tree | 08a0a4112e94675ffde647160706480e78435818 | |
| parent | d4077561a90a24d61e295745d70c0effa655a37c (diff) | |
| parent | 0563dae9a9e3a8c2b6de454693c0cc207e67f05d (diff) | |
| download | emacs-0b19c7867f5e647fa0269833fe74e0064b415c08.tar.gz emacs-0b19c7867f5e647fa0269833fe74e0064b415c08.zip | |
upstream
69 files changed, 1992 insertions, 1505 deletions
| @@ -1,3 +1,19 @@ | |||
| 1 | 2011-10-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Merge from gnulib, fixing some 'configure' typos (Bug#9696). | ||
| 4 | * lib/signal.in.h, lib/sigprocmask.c, m4/gl-comp.m4: | ||
| 5 | * m4/gnulib-common.m4: Merge from gnulib. | ||
| 6 | Without this, 'configure' would say "func_gl_gnulib_m4code_pathmax: | ||
| 7 | command not found" on powerpc-apple-darwin9.8.0. | ||
| 8 | |||
| 9 | * configure.in (GC_LISP_OBJECT_ALIGNMENT): Remove. | ||
| 10 | This is now done by src/alloc.c. | ||
| 11 | |||
| 12 | 2011-10-02 Richard Stallman <rms@gnu.org> | ||
| 13 | |||
| 14 | * configure.in: Rename xlinux_first_failure to xgnu_linux_first_failure | ||
| 15 | and xlinux_second_failure to xgnu_linux_second_failure. | ||
| 16 | |||
| 1 | 2011-09-29 Eli Zaretskii <eliz@gnu.org> | 17 | 2011-09-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 18 | ||
| 3 | * .bzrignore: Add ./GNUmakefile.unix, lib/SYS, lib/alloca.in-h, | 19 | * .bzrignore: Add ./GNUmakefile.unix, lib/SYS, lib/alloca.in-h, |
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index e1c25ef07f3..4481d8cd93b 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -158,7 +158,7 @@ building.texi | |||
| 158 | calendar.texi | 158 | calendar.texi |
| 159 | cal-xtra.texi | 159 | cal-xtra.texi |
| 160 | cmdargs.texi | 160 | cmdargs.texi |
| 161 | commands.texi | 161 | commands.texi cyd |
| 162 | custom.texi | 162 | custom.texi |
| 163 | dired.texi | 163 | dired.texi |
| 164 | dired-xtra.texi | 164 | dired-xtra.texi |
| @@ -166,7 +166,7 @@ display.texi | |||
| 166 | emacs.texi | 166 | emacs.texi |
| 167 | emacs-xtra.texi | 167 | emacs-xtra.texi |
| 168 | emerge-xtra.texi | 168 | emerge-xtra.texi |
| 169 | entering.texi | 169 | entering.texi cyd |
| 170 | files.texi | 170 | files.texi |
| 171 | fixit.texi | 171 | fixit.texi |
| 172 | fortran-xtra.texi | 172 | fortran-xtra.texi |
| @@ -190,7 +190,7 @@ picture-xtra.texi | |||
| 190 | programs.texi | 190 | programs.texi |
| 191 | regs.texi | 191 | regs.texi |
| 192 | rmail.texi | 192 | rmail.texi |
| 193 | screen.texi | 193 | screen.texi cyd |
| 194 | search.texi | 194 | search.texi |
| 195 | sending.texi | 195 | sending.texi |
| 196 | text.texi | 196 | text.texi |
diff --git a/autogen/config.in b/autogen/config.in index cbf7c225bd7..fd2c4f8eda5 100644 --- a/autogen/config.in +++ b/autogen/config.in | |||
| @@ -1473,9 +1473,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1473 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ | 1473 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ |
| 1474 | # define GC_SETJMP_WORKS 1 | 1474 | # define GC_SETJMP_WORKS 1 |
| 1475 | # endif | 1475 | # endif |
| 1476 | # ifndef GC_LISP_OBJECT_ALIGNMENT | ||
| 1477 | # define GC_LISP_OBJECT_ALIGNMENT (__alignof__ (Lisp_Object)) | ||
| 1478 | # endif | ||
| 1479 | #endif | 1476 | #endif |
| 1480 | 1477 | ||
| 1481 | #endif /* EMACS_CONFIG_H */ | 1478 | #endif /* EMACS_CONFIG_H */ |
diff --git a/autogen/configure b/autogen/configure index 7a4a3c10bdc..29fcb81a452 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -7040,6 +7040,8 @@ esac | |||
| 7040 | # Code from module stat: | 7040 | # Code from module stat: |
| 7041 | # Code from module stdarg: | 7041 | # Code from module stdarg: |
| 7042 | 7042 | ||
| 7043 | |||
| 7044 | |||
| 7043 | # Code from module stdbool: | 7045 | # Code from module stdbool: |
| 7044 | # Code from module stddef: | 7046 | # Code from module stddef: |
| 7045 | # Code from module stdint: | 7047 | # Code from module stdint: |
| @@ -10781,13 +10783,13 @@ XOpenDisplay ("foo"); | |||
| 10781 | } | 10783 | } |
| 10782 | _ACEOF | 10784 | _ACEOF |
| 10783 | if ac_fn_c_try_link "$LINENO"; then : | 10785 | if ac_fn_c_try_link "$LINENO"; then : |
| 10784 | xlinux_first_failure=no | 10786 | xgnu_linux_first_failure=no |
| 10785 | else | 10787 | else |
| 10786 | xlinux_first_failure=yes | 10788 | xgnu_linux_first_failure=yes |
| 10787 | fi | 10789 | fi |
| 10788 | rm -f core conftest.err conftest.$ac_objext \ | 10790 | rm -f core conftest.err conftest.$ac_objext \ |
| 10789 | conftest$ac_exeext conftest.$ac_ext | 10791 | conftest$ac_exeext conftest.$ac_ext |
| 10790 | if test "${xlinux_first_failure}" = "yes"; then | 10792 | if test "${xgnu_linux_first_failure}" = "yes"; then |
| 10791 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | 10793 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" |
| 10792 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | 10794 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" |
| 10793 | OLD_CPPFLAGS="$CPPFLAGS" | 10795 | OLD_CPPFLAGS="$CPPFLAGS" |
| @@ -10808,13 +10810,13 @@ XOpenDisplay ("foo"); | |||
| 10808 | } | 10810 | } |
| 10809 | _ACEOF | 10811 | _ACEOF |
| 10810 | if ac_fn_c_try_link "$LINENO"; then : | 10812 | if ac_fn_c_try_link "$LINENO"; then : |
| 10811 | xlinux_second_failure=no | 10813 | xgnu_linux_second_failure=no |
| 10812 | else | 10814 | else |
| 10813 | xlinux_second_failure=yes | 10815 | xgnu_linux_second_failure=yes |
| 10814 | fi | 10816 | fi |
| 10815 | rm -f core conftest.err conftest.$ac_objext \ | 10817 | rm -f core conftest.err conftest.$ac_objext \ |
| 10816 | conftest$ac_exeext conftest.$ac_ext | 10818 | conftest$ac_exeext conftest.$ac_ext |
| 10817 | if test "${xlinux_second_failure}" = "yes"; then | 10819 | if test "${xgnu_linux_second_failure}" = "yes"; then |
| 10818 | # If we get the same failure with -b, there is no use adding -b. | 10820 | # If we get the same failure with -b, there is no use adding -b. |
| 10819 | # So take it out. This plays safe. | 10821 | # So take it out. This plays safe. |
| 10820 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | 10822 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" |
| @@ -22141,10 +22143,14 @@ fi | |||
| 22141 | 22143 | ||
| 22142 | 22144 | ||
| 22143 | gl_gnulib_enabled_stat=true | 22145 | gl_gnulib_enabled_stat=true |
| 22144 | if $condition; then | 22146 | if test $REPLACE_STAT = 1; then |
| 22145 | func_gl_gnulib_m4code_dosname | 22147 | func_gl_gnulib_m4code_dosname |
| 22146 | fi | 22148 | fi |
| 22149 | <<<<<<< TREE | ||
| 22147 | if $condition; then | 22150 | if $condition; then |
| 22151 | ======= | ||
| 22152 | if test $REPLACE_STAT = 1; then | ||
| 22153 | >>>>>>> MERGE-SOURCE | ||
| 22148 | func_gl_gnulib_m4code_verify | 22154 | func_gl_gnulib_m4code_verify |
| 22149 | fi | 22155 | fi |
| 22150 | fi | 22156 | fi |
diff --git a/configure.in b/configure.in index e90ee4e5397..0accb3bc4c8 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1794,9 +1794,9 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 1794 | AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link) | 1794 | AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link) |
| 1795 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], | 1795 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], |
| 1796 | [[XOpenDisplay ("foo");]])], | 1796 | [[XOpenDisplay ("foo");]])], |
| 1797 | [xlinux_first_failure=no], | 1797 | [xgnu_linux_first_failure=no], |
| 1798 | [xlinux_first_failure=yes]) | 1798 | [xgnu_linux_first_failure=yes]) |
| 1799 | if test "${xlinux_first_failure}" = "yes"; then | 1799 | if test "${xgnu_linux_first_failure}" = "yes"; then |
| 1800 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | 1800 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" |
| 1801 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | 1801 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" |
| 1802 | OLD_CPPFLAGS="$CPPFLAGS" | 1802 | OLD_CPPFLAGS="$CPPFLAGS" |
| @@ -1807,9 +1807,9 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 1807 | LIBS="$LIBS -b i486-linuxaout" | 1807 | LIBS="$LIBS -b i486-linuxaout" |
| 1808 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], | 1808 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], |
| 1809 | [[XOpenDisplay ("foo");]])], | 1809 | [[XOpenDisplay ("foo");]])], |
| 1810 | [xlinux_second_failure=no], | 1810 | [xgnu_linux_second_failure=no], |
| 1811 | [xlinux_second_failure=yes]) | 1811 | [xgnu_linux_second_failure=yes]) |
| 1812 | if test "${xlinux_second_failure}" = "yes"; then | 1812 | if test "${xgnu_linux_second_failure}" = "yes"; then |
| 1813 | # If we get the same failure with -b, there is no use adding -b. | 1813 | # If we get the same failure with -b, there is no use adding -b. |
| 1814 | # So take it out. This plays safe. | 1814 | # So take it out. This plays safe. |
| 1815 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | 1815 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" |
| @@ -3713,9 +3713,6 @@ AH_BOTTOM([ | |||
| 3713 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ | 3713 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ |
| 3714 | # define GC_SETJMP_WORKS 1 | 3714 | # define GC_SETJMP_WORKS 1 |
| 3715 | # endif | 3715 | # endif |
| 3716 | # ifndef GC_LISP_OBJECT_ALIGNMENT | ||
| 3717 | # define GC_LISP_OBJECT_ALIGNMENT (__alignof__ (Lisp_Object)) | ||
| 3718 | # endif | ||
| 3719 | #endif | 3716 | #endif |
| 3720 | 3717 | ||
| 3721 | #endif /* EMACS_CONFIG_H */ | 3718 | #endif /* EMACS_CONFIG_H */ |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 7d883a6eb91..6adbe95cc97 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,76 @@ | |||
| 1 | 2011-10-09 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * help.texi (Help, Help Summary): Eliminate the unnecessary "help | ||
| 4 | option" terminology. | ||
| 5 | (Key Help): Add command names. Define "documentation string". | ||
| 6 | (Name Help): Remove an over-long joke. | ||
| 7 | (Apropos): Document prefix args. Remove duplicated descriptions. | ||
| 8 | (Help Mode): Add C-c C-b to table. Update TAB binding. | ||
| 9 | (Package Keywords): Rename from "Library by Keyword". Describe | ||
| 10 | new package menu interface. | ||
| 11 | (Help Files, Help Echo): Tweak description. | ||
| 12 | |||
| 13 | * mini.texi (Completion Options): Add completion-cycle-threshold. | ||
| 14 | (Minibuffer History): Document numeric args to history commands. | ||
| 15 | |||
| 16 | 2011-10-08 Eli Zaretskii <eliz@gnu.org> | ||
| 17 | |||
| 18 | * mule.texi (Bidirectional Editing): Correct some inaccuracies. | ||
| 19 | |||
| 20 | 2011-10-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 21 | |||
| 22 | * basic.texi (Position Info): Omit page commands. Document | ||
| 23 | count-words-region and count-words. | ||
| 24 | |||
| 25 | * text.texi (Pages): Move what-page documentation here. | ||
| 26 | |||
| 27 | 2011-10-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 28 | |||
| 29 | * mini.texi (Minibuffer File): Minor copyedits. Use xref to | ||
| 30 | Remote Files node instead of linking directly to the Tramp manual. | ||
| 31 | (Minibuffer Edit): Add xref to Blank Lines. | ||
| 32 | (Completion): Add xref to Symbol Completion. Remove redundant | ||
| 33 | example, which is repeated in the next node. | ||
| 34 | (Completion Commands): Minor clarifications. | ||
| 35 | (Completion Styles): New node, split from Completion Commands. | ||
| 36 | Document substring and initials styles. | ||
| 37 | (Strict Completion): Remove information duplicated in other nodes. | ||
| 38 | (Completion Options): Consolidate case difference discussion here. | ||
| 39 | |||
| 40 | * help.texi (Help Mode): Fix kindex entries. | ||
| 41 | |||
| 42 | * files.texi (File Names): Add index entries. | ||
| 43 | |||
| 44 | 2011-10-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 45 | |||
| 46 | * basic.texi (Inserting Text): Add xref to Completion. Add | ||
| 47 | ucs-insert example, and document prefix argument. | ||
| 48 | (Moving Point): Fix introduction; C-f/C-b are no longer equivalent | ||
| 49 | to left/right. Tweak left-char and right-char descriptions. | ||
| 50 | M-left and M-right are now bound to left-word/right-word. | ||
| 51 | (Erasing): Document delete-forward-char. | ||
| 52 | |||
| 53 | * screen.texi (Screen, Menu Bar): Copyedits. | ||
| 54 | (Point): Remove duplicate paragraph on cursors, also in Screen. | ||
| 55 | (Mode Line): Trailing dashes no longer shown on X displays. | ||
| 56 | |||
| 57 | * frames.texi (Non-Window Terminals): Index just "text-only | ||
| 58 | terminal", which is used throughout the manual now. | ||
| 59 | |||
| 60 | * entering.texi (Entering Emacs): Define "startup screen". | ||
| 61 | Document window-splitting behavior with command-line inputs. | ||
| 62 | (Exiting): Remove obsolete paragraph about shells without suspend | ||
| 63 | functionality. | ||
| 64 | |||
| 65 | * commands.texi (User Input): Define "input event" more clearly. | ||
| 66 | (Keys): Add xref to Echo Area. | ||
| 67 | (Commands): Clarify relation between commands and functions. | ||
| 68 | |||
| 69 | 2011-10-06 Chong Yidong <cyd@stupidchicken.com> | ||
| 70 | |||
| 71 | * misc.texi (emacsclient Options): Document how emacsclient runs | ||
| 72 | the Emacs daemon (Bug#9674). | ||
| 73 | |||
| 1 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> | 74 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 75 | ||
| 3 | * basic.texi (Moving Point): | 76 | * basic.texi (Moving Point): |
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 8c8708a3b51..e4e7dadd548 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | Here we explain the basics of how to enter text, make corrections, | 10 | Here we explain the basics of how to enter text, make corrections, |
| 11 | and save the text in a file. If this material is new to you, we | 11 | and save the text in a file. If this material is new to you, we |
| 12 | suggest you first run the Emacs learn-by-doing tutorial, by typing | 12 | suggest you first run the Emacs learn-by-doing tutorial, by typing |
| 13 | @kbd{Control-h t} inside Emacs. (@code{help-with-tutorial}). | 13 | @kbd{C-h t} (@code{help-with-tutorial}). |
| 14 | 14 | ||
| 15 | @menu | 15 | @menu |
| 16 | 16 | ||
| @@ -23,7 +23,7 @@ suggest you first run the Emacs learn-by-doing tutorial, by typing | |||
| 23 | * Help: Basic Help. Asking what a character does. | 23 | * Help: Basic Help. Asking what a character does. |
| 24 | * Blank Lines:: Making and deleting blank lines. | 24 | * Blank Lines:: Making and deleting blank lines. |
| 25 | * Continuation Lines:: How Emacs displays lines too wide for the screen. | 25 | * Continuation Lines:: How Emacs displays lines too wide for the screen. |
| 26 | * Position Info:: What page, line, row, or column is point on? | 26 | * Position Info:: What line, row, or column is point on? |
| 27 | * Arguments:: Numeric arguments for repeating a command N times. | 27 | * Arguments:: Numeric arguments for repeating a command N times. |
| 28 | * Repeating:: Repeating the previous command quickly. | 28 | * Repeating:: Repeating the previous command quickly. |
| 29 | @end menu | 29 | @end menu |
| @@ -41,20 +41,20 @@ forward, so that point remains just after the inserted text. | |||
| 41 | 41 | ||
| 42 | @kindex RET | 42 | @kindex RET |
| 43 | @cindex newline | 43 | @cindex newline |
| 44 | To end a line and start a new one, type @key{RET}. This key may be | 44 | To end a line and start a new one, type @key{RET} (@code{newline}). |
| 45 | labeled @key{Return} or @key{Enter} on your keyboard, but we refer to | 45 | (The @key{RET} key may be labeled @key{Return} or @key{Enter} on your |
| 46 | it as @key{RET} in this manual. Pressing it inserts a newline | 46 | keyboard, but we refer to it as @key{RET} in this manual.) This |
| 47 | character in the buffer. If point is at the end of the line, this | 47 | command inserts a newline character into the buffer. If point is at |
| 48 | creates a new blank line after it; if point is in the middle of a | 48 | the end of the line, the effect is to create a new blank line after |
| 49 | line, the line is split at that position. | 49 | it; if point is in the middle of a line, the line is split at that |
| 50 | position. | ||
| 50 | 51 | ||
| 51 | As we explain later in this manual, you can change the way Emacs | 52 | As we explain later in this manual, you can change the way Emacs |
| 52 | handles text insertion by turning on @dfn{minor modes}. For instance, | 53 | handles text insertion by turning on @dfn{minor modes}. For instance, |
| 53 | if you turn on a minor mode called @dfn{Auto Fill} mode, Emacs can | 54 | the minor mode called Auto Fill mode splits lines automatically when |
| 54 | split lines automatically when they become too long (@pxref{Filling}). | 55 | they get too long (@pxref{Filling}). The minor mode called Overwrite |
| 55 | If you turn on a minor mode called @dfn{Overwrite} mode, inserted | 56 | mode causes inserted characters to replace (overwrite) existing text, |
| 56 | characters replace (overwrite) existing text, instead of shoving it to | 57 | instead of shoving it to the right. @xref{Minor Modes}. |
| 57 | the right. @xref{Minor Modes}. | ||
| 58 | 58 | ||
| 59 | @cindex quoting | 59 | @cindex quoting |
| 60 | @kindex C-q | 60 | @kindex C-q |
| @@ -80,9 +80,10 @@ literal @samp{DEL} character. | |||
| 80 | @kbd{C-q} followed by a sequence of octal digits inserts the character | 80 | @kbd{C-q} followed by a sequence of octal digits inserts the character |
| 81 | with the specified octal character code. You can use any number of | 81 | with the specified octal character code. You can use any number of |
| 82 | octal digits; any non-digit terminates the sequence. If the | 82 | octal digits; any non-digit terminates the sequence. If the |
| 83 | terminating character is @key{RET}, it serves only to terminate the | 83 | terminating character is @key{RET}, that @key{RET} serves only to |
| 84 | sequence. Any other non-digit terminates the sequence and then acts | 84 | terminate the sequence. Any other non-digit terminates the sequence |
| 85 | as normal input---thus, @kbd{C-q 1 0 1 B} inserts @samp{AB}. | 85 | and then acts as normal input---thus, @kbd{C-q 1 0 1 B} inserts |
| 86 | @samp{AB}. | ||
| 86 | 87 | ||
| 87 | The use of octal sequences is disabled in ordinary non-binary | 88 | The use of octal sequences is disabled in ordinary non-binary |
| 88 | Overwrite mode, to give you a convenient way to insert a digit instead | 89 | Overwrite mode, to give you a convenient way to insert a digit instead |
| @@ -96,21 +97,28 @@ To use decimal or hexadecimal instead of octal, set the variable | |||
| 96 | the letters @kbd{a} to @kbd{f} serve as part of a character code, | 97 | the letters @kbd{a} to @kbd{f} serve as part of a character code, |
| 97 | just like digits. Case is ignored. | 98 | just like digits. Case is ignored. |
| 98 | 99 | ||
| 99 | A numeric argument tells @kbd{C-q} how many copies of the quoted | ||
| 100 | character to insert (@pxref{Arguments}). | ||
| 101 | |||
| 102 | @findex ucs-insert | 100 | @findex ucs-insert |
| 103 | @kindex C-x 8 RET | 101 | @kindex C-x 8 RET |
| 104 | @cindex Unicode characters, inserting | 102 | @cindex Unicode characters, inserting |
| 105 | @cindex insert Unicode character | 103 | @cindex insert Unicode character |
| 106 | @cindex characters, inserting by name or code-point | 104 | @cindex characters, inserting by name or code-point |
| 107 | Instead of @kbd{C-q}, you can use @kbd{C-x 8 @key{RET}} | 105 | Instead of @kbd{C-q}, you can use the command @kbd{C-x 8 @key{RET}} |
| 108 | (@code{ucs-insert}) to insert a character based on its Unicode name or | 106 | (@code{ucs-insert}). This prompts for the Unicode name or code-point |
| 109 | code-point. This command prompts for a character to insert, using | 107 | of a character, using the minibuffer. If you enter a name, the |
| 110 | the minibuffer; you can specify the character using either (i) the | 108 | command provides completion (@pxref{Completion}). If you enter a |
| 111 | character's name in the Unicode standard, or (ii) the character's | 109 | code-point, it should be a hexadecimal number (which is the convention |
| 112 | code-point in the Unicode standard. If you specify the character's | 110 | for Unicode). The command then inserts the corresponding character |
| 113 | name, the command provides completion. | 111 | into the buffer. For example, both of the following insert the |
| 112 | infinity sign (Unicode code-point @code{#x221E}): | ||
| 113 | |||
| 114 | @example | ||
| 115 | @kbd{C-x 8 @key{RET} infinity @key{RET}} | ||
| 116 | @kbd{C-x 8 @key{RET} 221e @key{RET}} | ||
| 117 | @end example | ||
| 118 | |||
| 119 | A numeric argument to either @kbd{C-q} or @kbd{C-x 8 @key{RET}} | ||
| 120 | specifies how many copies of the character to insert | ||
| 121 | (@pxref{Arguments}). | ||
| 114 | 122 | ||
| 115 | @node Moving Point | 123 | @node Moving Point |
| 116 | @section Changing the Location of Point | 124 | @section Changing the Location of Point |
| @@ -123,85 +131,104 @@ name, the command provides completion. | |||
| 123 | To do more than insert characters, you have to know how to move | 131 | To do more than insert characters, you have to know how to move |
| 124 | point (@pxref{Point}). The keyboard commands @kbd{C-f}, @kbd{C-b}, | 132 | point (@pxref{Point}). The keyboard commands @kbd{C-f}, @kbd{C-b}, |
| 125 | @kbd{C-n}, and @kbd{C-p} move point to the right, left, up and down | 133 | @kbd{C-n}, and @kbd{C-p} move point to the right, left, up and down |
| 126 | respectively. These are equivalent to the commands @kbd{@key{right}}, | 134 | respectively. You can also move point using the @dfn{arrow keys} |
| 127 | @kbd{@key{left}}, @kbd{@key{down}}, and @kbd{@key{up}}, entered using | 135 | present on most keyboards: @kbd{@key{right}}, @kbd{@key{left}}, |
| 128 | the @dfn{arrow keys} present on many keyboards. Many Emacs users find | 136 | @kbd{@key{down}}, and @kbd{@key{up}}; however, many Emacs users find |
| 129 | that it is slower to use the arrow keys than the equivalent control | 137 | that it is slower to use the arrow keys than the control keys. |
| 130 | keys. You can also click the left mouse button to move point to the | 138 | |
| 139 | You can also click the left mouse button to move point to the | ||
| 131 | position clicked. Emacs also provides a variety of additional | 140 | position clicked. Emacs also provides a variety of additional |
| 132 | keyboard commands that move point in more sophisticated ways. | 141 | keyboard commands that move point in more sophisticated ways. |
| 133 | 142 | ||
| 134 | @kindex C-a | 143 | @table @kbd |
| 135 | @kindex C-e | 144 | |
| 145 | @item C-f | ||
| 136 | @kindex C-f | 146 | @kindex C-f |
| 137 | @kindex C-b | ||
| 138 | @kindex C-n | ||
| 139 | @kindex C-p | ||
| 140 | @kindex M-> | ||
| 141 | @kindex M-< | ||
| 142 | @kindex M-r | ||
| 143 | @kindex LEFT | ||
| 144 | @kindex RIGHT | ||
| 145 | @kindex UP | ||
| 146 | @kindex DOWN | ||
| 147 | @findex move-beginning-of-line | ||
| 148 | @findex move-end-of-line | ||
| 149 | @findex forward-char | 147 | @findex forward-char |
| 150 | @findex backward-char | 148 | Move forward one character (@code{forward-char}). |
| 149 | |||
| 150 | @item @key{right} | ||
| 151 | @kindex RIGHT | ||
| 151 | @findex right-char | 152 | @findex right-char |
| 153 | This command (@code{right-char}) behaves like @kbd{C-f}, with one | ||
| 154 | exception: when editing right-to-left scripts such as Arabic, it | ||
| 155 | instead moves @emph{backward} if the current paragraph is a | ||
| 156 | right-to-left paragraph. @xref{Bidirectional Editing}. | ||
| 157 | |||
| 158 | @item C-b | ||
| 159 | @kindex C-b | ||
| 160 | @findex backward-char | ||
| 161 | Move backward one character (@code{backward-char}). | ||
| 162 | |||
| 163 | @item @key{left} | ||
| 164 | @kindex LEFT | ||
| 152 | @findex left-char | 165 | @findex left-char |
| 166 | This command (@code{left-char}) behaves like @kbd{C-b}, except it | ||
| 167 | moves @emph{forward} if the current paragraph is right-to-left. | ||
| 168 | @xref{Bidirectional Editing}. | ||
| 169 | |||
| 170 | @item C-n | ||
| 171 | @itemx @key{down} | ||
| 172 | @kindex C-n | ||
| 173 | @kindex DOWN | ||
| 153 | @findex next-line | 174 | @findex next-line |
| 175 | Move down one screen line (@code{next-line}). This command attempts | ||
| 176 | to keep the horizontal position unchanged, so if you start in the | ||
| 177 | middle of one line, you move to the middle of the next. | ||
| 178 | |||
| 179 | @item C-p | ||
| 180 | @itemx @key{up} | ||
| 181 | @kindex C-p | ||
| 182 | @kindex UP | ||
| 154 | @findex previous-line | 183 | @findex previous-line |
| 155 | @findex beginning-of-buffer | 184 | Move up one screen line (@code{previous-line}). This command |
| 156 | @findex end-of-buffer | 185 | preserves position within the line, like @kbd{C-n}. |
| 157 | @findex goto-char | 186 | |
| 158 | @findex goto-line | ||
| 159 | @findex move-to-window-line | ||
| 160 | @table @kbd | ||
| 161 | @item C-a | 187 | @item C-a |
| 162 | @itemx @key{Home} | 188 | @itemx @key{Home} |
| 189 | @kindex C-a | ||
| 190 | @kindex HOME | ||
| 191 | @findex move-beginning-of-line | ||
| 163 | Move to the beginning of the line (@code{move-beginning-of-line}). | 192 | Move to the beginning of the line (@code{move-beginning-of-line}). |
| 193 | |||
| 164 | @item C-e | 194 | @item C-e |
| 165 | @itemx @key{End} | 195 | @itemx @key{End} |
| 196 | @kindex C-e | ||
| 197 | @kindex END | ||
| 198 | @findex move-end-of-line | ||
| 166 | Move to the end of the line (@code{move-end-of-line}). | 199 | Move to the end of the line (@code{move-end-of-line}). |
| 167 | @item C-f | 200 | |
| 168 | Move forward one character (@code{forward-char}). | ||
| 169 | @item @key{right} | ||
| 170 | Move one character to the right (@code{right-char}). This | ||
| 171 | moves one character forward in text that is read in the usual | ||
| 172 | left-to-right direction, but one character @emph{backward} if the text | ||
| 173 | is read right-to-left, as needed for right-to-left scripts such as | ||
| 174 | Arabic. @xref{Bidirectional Editing}. | ||
| 175 | @item C-b | ||
| 176 | Move backward one character (@code{backward-char}). | ||
| 177 | @item @key{left} | ||
| 178 | Move one character to the left (@code{left-char}). This | ||
| 179 | moves one character backward in left-to-right text and one character | ||
| 180 | forward in right-to-left text. | ||
| 181 | @item M-f | 201 | @item M-f |
| 182 | @itemx M-@key{right} | 202 | @kindex M-f |
| 203 | @findex forward-word | ||
| 183 | Move forward one word (@code{forward-word}). | 204 | Move forward one word (@code{forward-word}). |
| 205 | |||
| 184 | @item C-@key{right} | 206 | @item C-@key{right} |
| 185 | Move one word to the right (@code{right-word}). This moves one word | 207 | @itemx M-@key{right} |
| 186 | forward in left-to-right text and one word backward in right-to-left | 208 | @kindex C-RIGHT |
| 187 | text. | 209 | @kindex M-RIGHT |
| 210 | @findex right-word | ||
| 211 | This command (@code{right-word}) behaves like @kbd{M-f}, except it | ||
| 212 | moves @emph{backward} by one word if the current paragraph is | ||
| 213 | right-to-left. @xref{Bidirectional Editing}. | ||
| 214 | |||
| 188 | @item M-b | 215 | @item M-b |
| 189 | @itemx M-@key{left} | 216 | @kindex M-b |
| 217 | @findex backward-word | ||
| 190 | Move backward one word (@code{backward-word}). | 218 | Move backward one word (@code{backward-word}). |
| 219 | |||
| 191 | @item C-@key{left} | 220 | @item C-@key{left} |
| 192 | Move one word to the left (@code{left-word}). This moves one word | 221 | @itemx M-@key{left} |
| 193 | backward in left-to-right text and one word forward in right-to-left | 222 | @kindex C-LEFT |
| 194 | text. | 223 | @kindex M-LEFT |
| 195 | @item C-n | 224 | @findex left-word |
| 196 | @itemx @key{down} | 225 | This command (@code{left-word}) behaves like @kbd{M-f}, except it |
| 197 | Move down one screen line (@code{next-line}). This command attempts | 226 | moves @emph{forward} by one word if the current paragraph is |
| 198 | to keep the horizontal position unchanged, so if you start in the | 227 | right-to-left. @xref{Bidirectional Editing}. |
| 199 | middle of one line, you move to the middle of the next. | 228 | |
| 200 | @item C-p | ||
| 201 | @itemx @key{up} | ||
| 202 | Move up one screen line (@code{previous-line}). This command | ||
| 203 | preserves position within the line, like @kbd{C-n}. | ||
| 204 | @item M-r | 229 | @item M-r |
| 230 | @kindex M-r | ||
| 231 | @findex move-to-window-line-top-bottom | ||
| 205 | Without moving the text on the screen, reposition point on the left | 232 | Without moving the text on the screen, reposition point on the left |
| 206 | margin of the center-most text line of the window; on subsequent | 233 | margin of the center-most text line of the window; on subsequent |
| 207 | consecutive invocations, move point to the left margin of the top-most | 234 | consecutive invocations, move point to the left margin of the top-most |
| @@ -211,13 +238,18 @@ line, the bottom-most line, and so forth, in cyclic order | |||
| 211 | A numeric argument says which screen line to place point on, counting | 238 | A numeric argument says which screen line to place point on, counting |
| 212 | downward from the top of the window (zero means the top line). A | 239 | downward from the top of the window (zero means the top line). A |
| 213 | negative argument counts lines up from the bottom (@minus{}1 means the | 240 | negative argument counts lines up from the bottom (@minus{}1 means the |
| 214 | bottom line). | 241 | bottom line). @xref{Arguments}, for more information on numeric |
| 242 | arguments. | ||
| 215 | 243 | ||
| 216 | @item M-< | 244 | @item M-< |
| 245 | @kindex M-< | ||
| 246 | @findex beginning-of-buffer | ||
| 217 | Move to the top of the buffer (@code{beginning-of-buffer}). With | 247 | Move to the top of the buffer (@code{beginning-of-buffer}). With |
| 218 | numeric argument @var{n}, move to @var{n}/10 of the way from the top. | 248 | numeric argument @var{n}, move to @var{n}/10 of the way from the top. |
| 219 | @xref{Arguments}, for more information on numeric arguments.@refill | 249 | |
| 220 | @item M-> | 250 | @item M-> |
| 251 | @kindex M-> | ||
| 252 | @findex end-of-buffer | ||
| 221 | Move to the end of the buffer (@code{end-of-buffer}). | 253 | Move to the end of the buffer (@code{end-of-buffer}). |
| 222 | 254 | ||
| 223 | @item C-v | 255 | @item C-v |
| @@ -233,10 +265,15 @@ Scroll one screen backward, and move point onscreen if necessary | |||
| 233 | (@code{scroll-down-command}). @xref{Scrolling}. | 265 | (@code{scroll-down-command}). @xref{Scrolling}. |
| 234 | 266 | ||
| 235 | @item M-x goto-char | 267 | @item M-x goto-char |
| 268 | @findex goto-char | ||
| 236 | Read a number @var{n} and move point to buffer position @var{n}. | 269 | Read a number @var{n} and move point to buffer position @var{n}. |
| 237 | Position 1 is the beginning of the buffer. | 270 | Position 1 is the beginning of the buffer. |
| 271 | |||
| 238 | @item M-g M-g | 272 | @item M-g M-g |
| 239 | @itemx M-g g | 273 | @itemx M-g g |
| 274 | @kindex M-g M-g | ||
| 275 | @kindex M-g g | ||
| 276 | @findex goto-line | ||
| 240 | Read a number @var{n} and move point to the beginning of line number | 277 | Read a number @var{n} and move point to the beginning of line number |
| 241 | @var{n} (@code{goto-line}). Line 1 is the beginning of the buffer. If | 278 | @var{n} (@code{goto-line}). Line 1 is the beginning of the buffer. If |
| 242 | point is on or just after a number in the buffer, that is the default | 279 | point is on or just after a number in the buffer, that is the default |
| @@ -244,14 +281,16 @@ for @var{n}. Just type @key{RET} in the minibuffer to use it. You can | |||
| 244 | also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument. | 281 | also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument. |
| 245 | @xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it | 282 | @xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it |
| 246 | a plain prefix argument. | 283 | a plain prefix argument. |
| 284 | |||
| 247 | @item C-x C-n | 285 | @item C-x C-n |
| 248 | @findex set-goal-column | ||
| 249 | @kindex C-x C-n | 286 | @kindex C-x C-n |
| 287 | @findex set-goal-column | ||
| 250 | Use the current column of point as the @dfn{semipermanent goal column} | 288 | Use the current column of point as the @dfn{semipermanent goal column} |
| 251 | for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). When a | 289 | for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). When a |
| 252 | semipermanent goal column is in effect, those commands always try to | 290 | semipermanent goal column is in effect, those commands always try to |
| 253 | move to this column, or as close as possible to it, after moving | 291 | move to this column, or as close as possible to it, after moving |
| 254 | vertically. The goal column remains in effect until canceled. | 292 | vertically. The goal column remains in effect until canceled. |
| 293 | |||
| 255 | @item C-u C-x C-n | 294 | @item C-u C-x C-n |
| 256 | Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to | 295 | Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to |
| 257 | preserve the horizontal position, as usual. | 296 | preserve the horizontal position, as usual. |
| @@ -266,9 +305,8 @@ can force these commands to move according to @dfn{logical lines} | |||
| 266 | (i.e., according to the text lines in the buffer) by setting the | 305 | (i.e., according to the text lines in the buffer) by setting the |
| 267 | variable @code{line-move-visual} to @code{nil}; if a logical line | 306 | variable @code{line-move-visual} to @code{nil}; if a logical line |
| 268 | occupies multiple screen lines, the cursor then skips over the | 307 | occupies multiple screen lines, the cursor then skips over the |
| 269 | additional screen lines. Moving by logical lines was the default | 308 | additional screen lines. For details, see @ref{Continuation Lines}. |
| 270 | behavior prior to Emacs 23.1. For details, see @ref{Continuation | 309 | @xref{Variables}, for how to set variables such as |
| 271 | Lines}. @xref{Variables}, for how to set variables such as | ||
| 272 | @code{line-move-visual}. | 310 | @code{line-move-visual}. |
| 273 | 311 | ||
| 274 | Unlike @kbd{C-n} and @kbd{C-p}, most of the Emacs commands that work | 312 | Unlike @kbd{C-n} and @kbd{C-p}, most of the Emacs commands that work |
| @@ -288,21 +326,30 @@ the end of the next logical line. Normally, @code{track-eol} is | |||
| 288 | 326 | ||
| 289 | @vindex next-line-add-newlines | 327 | @vindex next-line-add-newlines |
| 290 | @kbd{C-n} normally stops at the end of the buffer when you use it on | 328 | @kbd{C-n} normally stops at the end of the buffer when you use it on |
| 291 | the last line of the buffer. However, if you set the variable | 329 | the last line in the buffer. However, if you set the variable |
| 292 | @code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on | 330 | @code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on |
| 293 | the last line of a buffer creates an additional line at the end and | 331 | the last line of a buffer creates an additional line at the end and |
| 294 | moves down into it. | 332 | moves down into it. |
| 295 | 333 | ||
| 296 | @node Erasing | 334 | @node Erasing |
| 297 | @section Erasing Text | 335 | @section Erasing Text |
| 336 | @cindex killing characters and lines | ||
| 337 | @cindex deleting characters and lines | ||
| 338 | @cindex erasing characters and lines | ||
| 298 | 339 | ||
| 299 | @table @kbd | 340 | @table @kbd |
| 300 | @item @key{DEL} | 341 | @item @key{DEL} |
| 301 | @itemx @key{Backspace} | 342 | @itemx @key{Backspace} |
| 302 | Delete the character before point (@code{delete-backward-char}). | 343 | Delete the character before point, or the region if it is active |
| 303 | @item C-d | 344 | (@code{delete-backward-char}). |
| 345 | |||
| 304 | @itemx @key{Delete} | 346 | @itemx @key{Delete} |
| 347 | Delete the character after point, or the region if it is active | ||
| 348 | (@code{delete-forward-char}). | ||
| 349 | |||
| 350 | @item C-d | ||
| 305 | Delete the character after point (@code{delete-char}). | 351 | Delete the character after point (@code{delete-char}). |
| 352 | |||
| 306 | @item C-k | 353 | @item C-k |
| 307 | Kill to the end of the line (@code{kill-line}). | 354 | Kill to the end of the line (@code{kill-line}). |
| 308 | @item M-d | 355 | @item M-d |
| @@ -312,37 +359,40 @@ Kill back to the beginning of the previous word | |||
| 312 | (@code{backward-kill-word}). | 359 | (@code{backward-kill-word}). |
| 313 | @end table | 360 | @end table |
| 314 | 361 | ||
| 315 | The key @kbd{@key{DEL}} (@code{delete-backward-char}) removes the | 362 | The @kbd{@key{DEL}} (@code{delete-backward-char}) command removes |
| 316 | character before point, moving the cursor and all the characters after | 363 | the character before point, moving the cursor and the characters after |
| 317 | it backwards. On most keyboards, @key{DEL} is labelled | 364 | it backwards. If point was at the beginning of a line, this deletes |
| 318 | @key{Backspace}, but we refer to it as @key{DEL} in this manual. Do | 365 | the preceding newline, joining this line to the previous one. |
| 319 | not confuse @key{DEL} with another key, labelled @key{Delete}, that | ||
| 320 | exists on many keyboards; we will discuss @key{Delete} momentarily. | ||
| 321 | 366 | ||
| 322 | Typing @key{DEL} when the cursor is at the beginning of a line | 367 | If, however, the region is active, @kbd{@key{DEL}} instead deletes |
| 323 | deletes the preceding newline character, joining the line with the one | 368 | the text in the region. @xref{Mark}, for a description of the region. |
| 324 | before it. | ||
| 325 | 369 | ||
| 326 | On some text-only terminals, Emacs may not recognize the @key{DEL} | 370 | On most keyboards, @key{DEL} is labelled @key{Backspace}, but we |
| 327 | key properly. If @key{DEL} does not do the right thing (e.g., if it | 371 | refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} |
| 328 | deletes characters forwards), see @ref{DEL Does Not Delete}. | 372 | with the @key{Delete} key; we will discuss @key{Delete} momentarily.) |
| 373 | On some text-only terminals, Emacs may not recognize the @key{DEL} key | ||
| 374 | properly. @xref{DEL Does Not Delete}, if you encounter this problem. | ||
| 329 | 375 | ||
| 330 | @cindex killing characters and lines | 376 | The @key{delete} (@code{delete-forward-char}) command deletes in the |
| 331 | @cindex deleting characters and lines | 377 | ``opposite direction'': it deletes the character after point, i.e. the |
| 332 | @cindex erasing characters and lines | 378 | character under the cursor. If point was at the end of a line, this |
| 333 | The key @kbd{C-d} (@code{delete-char}) deletes the character after | 379 | joins the following line onto this one. Like @kbd{@key{DEL}}, it |
| 334 | point, i.e., the character under the cursor. This shifts the rest of | 380 | deletes the text in the region if the region is active (@pxref{Mark}). |
| 335 | the text on the line to the left. If you type @kbd{C-d} at the end of | 381 | |
| 336 | a line, it joins that line with the following line. This command is | 382 | @kbd{C-d} (@code{delete-char}) deletes the character after point, |
| 337 | also bound to the key labelled @key{Delete} on many keyboards. | 383 | similar to @key{delete}, but regardless of whether the region is |
| 384 | active. | ||
| 338 | 385 | ||
| 339 | To erase a larger amount of text, use the @kbd{C-k} key, which | 386 | @xref{Deletion}, for more detailed information about the above |
| 340 | erases (kills) a line at a time. If you type @kbd{C-k} at the | 387 | deletion commands. |
| 341 | beginning or middle of a line, it kills all the text up to the end of | ||
| 342 | the line. If you type @kbd{C-k} at the end of a line, it joins that | ||
| 343 | line with the following line. | ||
| 344 | 388 | ||
| 345 | To learn more about killing text, see @ref{Killing}. | 389 | @kbd{C-k} (@code{kill-line}) erases (kills) a line at a time. If |
| 390 | you type @kbd{C-k} at the beginning or middle of a line, it kills all | ||
| 391 | the text up to the end of the line. If you type @kbd{C-k} at the end | ||
| 392 | of a line, it joins that line with the following line. | ||
| 393 | |||
| 394 | @xref{Killing}, for more information about @kbd{C-k} and related | ||
| 395 | commands. | ||
| 346 | 396 | ||
| 347 | @node Basic Undo | 397 | @node Basic Undo |
| 348 | @section Undoing Changes | 398 | @section Undoing Changes |
| @@ -352,7 +402,7 @@ line with the following line. | |||
| 352 | Undo one entry of the undo records---usually, one command worth | 402 | Undo one entry of the undo records---usually, one command worth |
| 353 | (@code{undo}). | 403 | (@code{undo}). |
| 354 | @itemx C-x u | 404 | @itemx C-x u |
| 355 | @item C-_ | 405 | @itemx C-_ |
| 356 | The same. | 406 | The same. |
| 357 | @end table | 407 | @end table |
| 358 | 408 | ||
| @@ -379,10 +429,7 @@ command displays an error message and does nothing. | |||
| 379 | 429 | ||
| 380 | Text that you insert in an Emacs buffer lasts only as long as the | 430 | Text that you insert in an Emacs buffer lasts only as long as the |
| 381 | Emacs session. To keep any text permanently, you must put it in a | 431 | Emacs session. To keep any text permanently, you must put it in a |
| 382 | @dfn{file}. Files are named units of text which are stored by the | 432 | @dfn{file}. |
| 383 | operating system for you to retrieve later by name. To use the | ||
| 384 | contents of a file in any way, including editing it with Emacs, you | ||
| 385 | must specify the file name. | ||
| 386 | 433 | ||
| 387 | Suppose there is a file named @file{test.emacs} in your home | 434 | Suppose there is a file named @file{test.emacs} in your home |
| 388 | directory. To begin editing this file in Emacs, type | 435 | directory. To begin editing this file in Emacs, type |
| @@ -417,14 +464,15 @@ first time you save this buffer with @kbd{C-x C-s}. | |||
| 417 | @section Help | 464 | @section Help |
| 418 | 465 | ||
| 419 | @cindex getting help with keys | 466 | @cindex getting help with keys |
| 420 | If you forget what a key does, you can find out with the Help | 467 | If you forget what a key does, you can find out by typing @kbd{C-h |
| 421 | character, which is @kbd{C-h} (or @key{F1}, which is an alias for | 468 | k} (@code{describe-key}), followed by the key of interest; for |
| 422 | @kbd{C-h}). Type @kbd{C-h k}, followed by the key of interest; for | 469 | example, @kbd{C-h k C-n} tells you what @kbd{C-n} does. |
| 423 | example, @kbd{C-h k C-n} tells you what @kbd{C-n} does. @kbd{C-h} is | 470 | |
| 424 | a prefix key; @kbd{C-h k} is just one of its subcommands (the command | 471 | The prefix key @kbd{C-h} stands for ``help''. The key @key{F1} |
| 425 | @code{describe-key}). The other subcommands of @kbd{C-h} provide | 472 | serves as an alias for @kbd{C-h}. Apart from @kbd{C-h k}, there are |
| 426 | different kinds of help. Type @kbd{C-h} twice to get a description of | 473 | many other help commands providing different kinds of help. |
| 427 | all the help facilities. @xref{Help}. | 474 | |
| 475 | @xref{Help}, for details. | ||
| 428 | 476 | ||
| 429 | @node Blank Lines | 477 | @node Blank Lines |
| 430 | @section Blank Lines | 478 | @section Blank Lines |
| @@ -521,23 +569,26 @@ logical lines. @xref{Visual Line Mode}. | |||
| 521 | @section Cursor Position Information | 569 | @section Cursor Position Information |
| 522 | 570 | ||
| 523 | Here are commands to get information about the size and position of | 571 | Here are commands to get information about the size and position of |
| 524 | parts of the buffer, and to count lines. | 572 | parts of the buffer, and to count words and lines. |
| 525 | 573 | ||
| 526 | @table @kbd | 574 | @table @kbd |
| 527 | @item M-x what-page | ||
| 528 | Display the page number of point, and the line number within that page. | ||
| 529 | @item M-x what-line | 575 | @item M-x what-line |
| 530 | Display the line number of point in the whole buffer. | 576 | Display the line number of point. |
| 531 | @item M-x line-number-mode | 577 | @item M-x line-number-mode |
| 532 | @itemx M-x column-number-mode | 578 | @itemx M-x column-number-mode |
| 533 | Toggle automatic display of the current line number or column number. | 579 | Toggle automatic display of the current line number or column number. |
| 534 | @xref{Optional Mode Line}. | 580 | @xref{Optional Mode Line}. |
| 535 | @item M-x count-lines-region | 581 | |
| 536 | Display the number of lines in the current region. Normally bound to | 582 | @item M-= |
| 537 | @kbd{M-=}, except in a few specialist modes. @xref{Mark}, for | 583 | Display the number of lines, words, and characters that are present in |
| 538 | information about the region. | 584 | the region (@code{count-words-region}). @xref{Mark}, for information |
| 539 | @item M-x count-words-region | 585 | about the region. |
| 540 | Display the number of words in the current region. | 586 | |
| 587 | @item M-x count-words | ||
| 588 | Display the number of lines, words, and characters that are present in | ||
| 589 | the buffer. If the region is active (@pxref{Mark}), display the | ||
| 590 | numbers for the region instead. | ||
| 591 | |||
| 541 | @item C-x = | 592 | @item C-x = |
| 542 | Display the character code of character after point, character position of | 593 | Display the character code of character after point, character position of |
| 543 | point, and column of point (@code{what-cursor-position}). | 594 | point, and column of point (@code{what-cursor-position}). |
| @@ -549,7 +600,6 @@ Toggle automatic display of the size of the buffer. | |||
| 549 | @xref{Optional Mode Line}. | 600 | @xref{Optional Mode Line}. |
| 550 | @end table | 601 | @end table |
| 551 | 602 | ||
| 552 | @findex what-page | ||
| 553 | @findex what-line | 603 | @findex what-line |
| 554 | @cindex line number commands | 604 | @cindex line number commands |
| 555 | @cindex location of point | 605 | @cindex location of point |
| @@ -563,15 +613,14 @@ the accessible portion (@pxref{Narrowing}). By contrast, | |||
| 563 | @code{what-line} displays both the line number relative to the | 613 | @code{what-line} displays both the line number relative to the |
| 564 | narrowed region and the line number relative to the whole buffer. | 614 | narrowed region and the line number relative to the whole buffer. |
| 565 | 615 | ||
| 566 | @kbd{M-x what-page} counts pages from the beginning of the file, and | ||
| 567 | counts lines within the page, showing both numbers in the echo area. | ||
| 568 | @xref{Pages}. | ||
| 569 | |||
| 570 | @kindex M-= | 616 | @kindex M-= |
| 571 | @findex count-lines-region | 617 | @findex count-words-region |
| 572 | Use @kbd{M-x count-lines-region} (normally bound to @kbd{M-=}) to | 618 | @findex count-words |
| 573 | display the number of lines in the region (@pxref{Mark}). @xref{Pages}, | 619 | @kbd{M-=} (@code{count-words-region}) displays a message reporting |
| 574 | for the command @kbd{C-x l} which counts the lines in the current page. | 620 | the number of lines, words, and characters in the region. @kbd{M-x |
| 621 | count-words} displays a similar message for the entire buffer, or for | ||
| 622 | the region if the region is @dfn{active}. @xref{Mark}, for an | ||
| 623 | explanation of the region. | ||
| 575 | 624 | ||
| 576 | @kindex C-x = | 625 | @kindex C-x = |
| 577 | @findex what-cursor-position | 626 | @findex what-cursor-position |
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index cff725027e9..de6e7539c27 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi | |||
| @@ -23,25 +23,21 @@ input. | |||
| 23 | @cindex @acronym{ASCII} | 23 | @cindex @acronym{ASCII} |
| 24 | @cindex C- | 24 | @cindex C- |
| 25 | @cindex Control | 25 | @cindex Control |
| 26 | @cindex control characters | ||
| 27 | 26 | ||
| 28 | GNU Emacs is primarily designed for use with the keyboard. While it | 27 | GNU Emacs is primarily designed for use with the keyboard. While it |
| 29 | is possible to use the mouse to issue editing commands through the | 28 | is possible to use the mouse to issue editing commands through the |
| 30 | menu bar and tool bar, that is not as efficient as using the keyboard. | 29 | menu bar and tool bar, that is not as efficient as using the keyboard. |
| 31 | Therefore, this manual mainly documents how to edit with the keyboard. | 30 | Therefore, this manual mainly documents how to edit with the keyboard. |
| 32 | 31 | ||
| 32 | @cindex control character | ||
| 33 | Keyboard input into Emacs is based on a heavily-extended version of | 33 | Keyboard input into Emacs is based on a heavily-extended version of |
| 34 | @acronym{ASCII}. The simplest characters that you can input into | 34 | @acronym{ASCII}. Simple characters, like @samp{a}, @samp{B}, |
| 35 | Emacs correspond to graphic symbols such as @samp{a}, @samp{B}, | 35 | @samp{3}, @samp{=}, and the space character (denoted as @key{SPC}), |
| 36 | @samp{3}, @samp{=}, the space character (conventionally denoted as | 36 | are entered by typing the corresponding key. @dfn{Control |
| 37 | @key{SPC}), and so on. Entering these using the keyboard is | 37 | characters}, such as @key{RET}, @key{TAB}, @key{DEL}, @key{ESC}, |
| 38 | straightforward. Certain characters found on non-English keyboards | 38 | @key{F1}, @key{Home}, and @key{left}, are also entered this way, as |
| 39 | also fall into this category (@pxref{International}). | 39 | are certain characters found on non-English keyboards |
| 40 | 40 | (@pxref{International}). | |
| 41 | In addition to these simple characters, Emacs recognizes | ||
| 42 | @dfn{control characters} such as @key{RET}, @key{TAB}, @key{DEL}, | ||
| 43 | @key{ESC}, @key{F1}, @key{Home}, @key{left}, etc. Most keyboards have | ||
| 44 | special keys for entering these. | ||
| 45 | 41 | ||
| 46 | @cindex modifier keys | 42 | @cindex modifier keys |
| 47 | @cindex Control | 43 | @cindex Control |
| @@ -50,13 +46,14 @@ special keys for entering these. | |||
| 50 | @cindex M- | 46 | @cindex M- |
| 51 | Emacs also recognizes control characters that are entered using | 47 | Emacs also recognizes control characters that are entered using |
| 52 | @dfn{modifier keys}. Two commonly-used modifier keys are | 48 | @dfn{modifier keys}. Two commonly-used modifier keys are |
| 53 | @key{Control} (which is usually labelled as @key{Ctrl}), and | 49 | @key{Control} (usually labelled @key{Ctrl}), and @key{Meta} (usually |
| 54 | @key{Meta} (which is usually labeled as @key{Alt})@footnote{We refer | 50 | labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for |
| 55 | to @key{Alt} as @key{Meta} for historical reasons.}. For example, | 51 | historical reasons.}. For example, @kbd{Control-a} is entered by |
| 56 | @kbd{Control-a} is entered by holding down the @key{Ctrl} key while | 52 | holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer |
| 57 | pressing @kbd{a}; we will refer to this as @kbd{C-a} for short. | 53 | to this as @kbd{C-a} for short. Similarly @kbd{Meta-a}, or @kbd{M-a} |
| 58 | Similarly @kbd{Meta-a}, or @kbd{M-a} for short, is entered by holding | 54 | for short, is entered by holding down the @key{Alt} key and pressing |
| 59 | down the @key{Alt} key and pressing @kbd{a}. | 55 | @kbd{a}. Modifier keys can also be applied to non-alphanumerical |
| 56 | characters, e.g. @kbd{C-@key{F1}} or @kbd{M-@key{left}}. | ||
| 60 | 57 | ||
| 61 | @cindex @key{ESC} replacing @key{Meta} key | 58 | @cindex @key{ESC} replacing @key{Meta} key |
| 62 | You can also type Meta characters using two-character sequences | 59 | You can also type Meta characters using two-character sequences |
| @@ -68,33 +65,28 @@ character; instead, press @key{ESC} and release it, then enter the | |||
| 68 | next character. This feature is useful on certain text-only terminals | 65 | next character. This feature is useful on certain text-only terminals |
| 69 | where the @key{Meta} key does not function reliably. | 66 | where the @key{Meta} key does not function reliably. |
| 70 | 67 | ||
| 71 | Modifier keys can apply not only to alphanumerical characters, but | ||
| 72 | also to special input characters, such as the arrow keys and mouse | ||
| 73 | buttons. | ||
| 74 | |||
| 75 | @cindex input event | ||
| 76 | @xref{Input Events,,, elisp, The Emacs Lisp Reference Manual}, for | ||
| 77 | the full Lisp-level details about keyboard and mouse input, which are | ||
| 78 | collectively referred to as @dfn{input events}. If you are not doing | ||
| 79 | Lisp programming, but simply want to redefine the meaning of some | ||
| 80 | characters or non-character events, see @ref{Customization}. | ||
| 81 | |||
| 82 | @cindex keys stolen by window manager | 68 | @cindex keys stolen by window manager |
| 83 | @cindex window manager, keys stolen by | 69 | @cindex window manager, keys stolen by |
| 84 | On graphical displays, the window manager is likely to block the | 70 | On graphical displays, the window manager might block some keyboard |
| 85 | character @kbd{M-@key{TAB}} before Emacs can see it. It may also | 71 | inputs, including @kbd{M-@key{TAB}}, @kbd{M-@key{SPC}}, @kbd{C-M-d} |
| 86 | block @kbd{M-@key{SPC}}, @kbd{C-M-d} and @kbd{C-M-l}. If you have | 72 | and @kbd{C-M-l}. If you have this problem, you can either customize |
| 87 | these problems, we recommend that you customize your window manager to | 73 | your window manager to not block those keys, or ``rebind'' the |
| 88 | turn off those commands, or put them on key combinations that Emacs | 74 | affected Emacs commands (@pxref{Customization}). |
| 89 | does not use. | 75 | |
| 76 | @cindex input event | ||
| 77 | Simple characters and control characters, as well as certain | ||
| 78 | non-keyboard inputs such as mouse clicks, are collectively referred to | ||
| 79 | as @dfn{input events}. For details about how Emacs internally handles | ||
| 80 | input events, see @ref{Input Events,,, elisp, The Emacs Lisp Reference | ||
| 81 | Manual}. | ||
| 90 | 82 | ||
| 91 | @node Keys, Commands, User Input, Top | 83 | @node Keys, Commands, User Input, Top |
| 92 | @section Keys | 84 | @section Keys |
| 93 | 85 | ||
| 94 | Some Emacs commands are invoked by just one input event; for | 86 | Some Emacs commands are invoked by just one input event; for |
| 95 | example, @kbd{C-f} moves forward one character in the buffer. But | 87 | example, @kbd{C-f} moves forward one character in the buffer. Other |
| 96 | Emacs also has commands that take two or more input events to invoke, | 88 | commands take two or more input events to invoke, such as @kbd{C-x |
| 97 | such as @kbd{C-x C-f} and @kbd{C-x 4 C-f}. | 89 | C-f} and @kbd{C-x 4 C-f}. |
| 98 | 90 | ||
| 99 | @cindex key | 91 | @cindex key |
| 100 | @cindex key sequence | 92 | @cindex key sequence |
| @@ -106,23 +98,23 @@ invokes a command, we call it a @dfn{complete key}; for example, | |||
| 106 | @kbd{C-f}, @kbd{C-x C-f} and @kbd{C-x 4 C-f} are all complete keys. | 98 | @kbd{C-f}, @kbd{C-x C-f} and @kbd{C-x 4 C-f} are all complete keys. |
| 107 | If a key sequence isn't long enough to invoke a command, we call it a | 99 | If a key sequence isn't long enough to invoke a command, we call it a |
| 108 | @dfn{prefix key}; from the preceding example, we see that @kbd{C-x} | 100 | @dfn{prefix key}; from the preceding example, we see that @kbd{C-x} |
| 109 | and @kbd{C-x 4} are prefix keys. Every key is either a complete key | 101 | and @kbd{C-x 4} are prefix keys. Every key sequence is either a |
| 110 | or a prefix key. | 102 | complete key or a prefix key. |
| 111 | 103 | ||
| 112 | A prefix key combines with the following input event to make a | 104 | A prefix key combines with the following input event to make a |
| 113 | longer key sequence, which may itself be complete or a prefix. For | 105 | longer key sequence. For example, @kbd{C-x} is a prefix key, so |
| 114 | example, @kbd{C-x} is a prefix key, so @kbd{C-x} and the next input | 106 | typing @kbd{C-x} alone does not invoke a command; instead, Emacs waits |
| 115 | event combine to make a two-event key sequence. This two-event key | 107 | for further input (if you pause for longer than a second, it echoes |
| 116 | sequence could itself be a prefix key (such as @kbd{C-x 4}), or a | 108 | the @kbd{C-x} key to prompt for that input; @pxref{Echo Area}). |
| 117 | complete key (such as @kbd{C-x C-f}). There is no limit to the length | 109 | @kbd{C-x} combines with the next input event to make a two-event key |
| 118 | of a key sequence, but in practice people rarely use sequences longer | 110 | sequence, which could itself be a prefix key (such as @kbd{C-x 4}), or |
| 119 | than three or four input events. | 111 | a complete key (such as @kbd{C-x C-f}). There is no limit to the |
| 120 | 112 | length of key sequences, but in practice they are seldom longer than | |
| 121 | You can't add input events onto a complete key. For example, the | 113 | three or four input events. |
| 122 | two-event sequence @kbd{C-f C-k} is not a key, because the @kbd{C-f} | 114 | |
| 123 | is a complete key in itself, so @kbd{C-f C-k} cannot have an | 115 | You can't add input events onto a complete key. For example, |
| 124 | independent meaning as a command. @kbd{C-f C-k} is two key sequences, | 116 | because @kbd{C-f} is a complete key, the two-event sequence @kbd{C-f |
| 125 | not one.@refill | 117 | C-k} is two key sequences, not one. |
| 126 | 118 | ||
| 127 | By default, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h}, | 119 | By default, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h}, |
| 128 | @kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x | 120 | @kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x |
| @@ -132,22 +124,20 @@ aliases for @kbd{C-h} and @kbd{C-x 6}.) This list is not cast in | |||
| 132 | stone; if you customize Emacs, you can make new prefix keys. You | 124 | stone; if you customize Emacs, you can make new prefix keys. You |
| 133 | could even eliminate some of the standard ones, though this is not | 125 | could even eliminate some of the standard ones, though this is not |
| 134 | recommended for most users; for example, if you remove the prefix | 126 | recommended for most users; for example, if you remove the prefix |
| 135 | definition of @kbd{C-x 4}, then @kbd{C-x 4 @var{anything}} would | 127 | definition of @kbd{C-x 4}, then @kbd{C-x 4 C-f} becomes an invalid key |
| 136 | become an invalid key sequence. @xref{Key Bindings}. | 128 | sequence. @xref{Key Bindings}. |
| 137 | 129 | ||
| 138 | Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key | 130 | Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key |
| 139 | displays a list of the commands starting with that prefix. The sole | 131 | displays a list of the commands starting with that prefix. The sole |
| 140 | exception to this rule is @key{ESC}: @kbd{@key{ESC} C-h} is equivalent | 132 | exception to this rule is @key{ESC}: @kbd{@key{ESC} C-h} is equivalent |
| 141 | to @kbd{C-M-h}, which does something else entirely. You can, however, | 133 | to @kbd{C-M-h}, which does something else entirely. You can, however, |
| 142 | use @key{F1} to displays a list of the commands starting with | 134 | use @key{F1} to display a list of commands starting with @key{ESC}. |
| 143 | @key{ESC}. | ||
| 144 | 135 | ||
| 145 | @node Commands, Entering Emacs, Keys, Top | 136 | @node Commands, Entering Emacs, Keys, Top |
| 146 | @section Keys and Commands | 137 | @section Keys and Commands |
| 147 | 138 | ||
| 148 | @cindex binding | 139 | @cindex binding |
| 149 | @cindex command | 140 | @cindex command |
| 150 | @cindex function definition | ||
| 151 | This manual is full of passages that tell you what particular keys | 141 | This manual is full of passages that tell you what particular keys |
| 152 | do. But Emacs does not assign meanings to keys directly. Instead, | 142 | do. But Emacs does not assign meanings to keys directly. Instead, |
| 153 | Emacs assigns meanings to named @dfn{commands}, and then gives keys | 143 | Emacs assigns meanings to named @dfn{commands}, and then gives keys |
| @@ -155,11 +145,9 @@ their meanings by @dfn{binding} them to commands. | |||
| 155 | 145 | ||
| 156 | Every command has a name chosen by a programmer. The name is | 146 | Every command has a name chosen by a programmer. The name is |
| 157 | usually made of a few English words separated by dashes; for example, | 147 | usually made of a few English words separated by dashes; for example, |
| 158 | @code{next-line} or @code{forward-word}. A command also has a | 148 | @code{next-line} or @code{forward-word}. Internally, each command is |
| 159 | @dfn{function definition} which is a Lisp program; this is how the | 149 | a special type of Lisp @dfn{function}, and the actions associated with |
| 160 | command does its work. In Emacs Lisp, a command is a Lisp function | 150 | the command are performed by running the function. @xref{What Is a |
| 161 | with special properties that make it suitable for interactive use. | ||
| 162 | For more information on commands and functions, see @ref{What Is a | ||
| 163 | Function,, What Is a Function, elisp, The Emacs Lisp Reference | 151 | Function,, What Is a Function, elisp, The Emacs Lisp Reference |
| 164 | Manual}. | 152 | Manual}. |
| 165 | 153 | ||
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index bb675b61cff..286595c2b45 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -264,7 +264,7 @@ Basic Editing Commands | |||
| 264 | * Basic Help:: Asking what a character does. | 264 | * Basic Help:: Asking what a character does. |
| 265 | * Blank Lines:: Making and deleting blank lines. | 265 | * Blank Lines:: Making and deleting blank lines. |
| 266 | * Continuation Lines:: How Emacs displays lines too wide for the screen. | 266 | * Continuation Lines:: How Emacs displays lines too wide for the screen. |
| 267 | * Position Info:: What page, line, row, or column is point on? | 267 | * Position Info:: What line, row, or column is point on? |
| 268 | * Arguments:: Numeric arguments for repeating a command N times. | 268 | * Arguments:: Numeric arguments for repeating a command N times. |
| 269 | * Repeating:: Repeating the previous command quickly. | 269 | * Repeating:: Repeating the previous command quickly. |
| 270 | 270 | ||
| @@ -282,6 +282,7 @@ Completion | |||
| 282 | * Completion Example:: Examples of using completion. | 282 | * Completion Example:: Examples of using completion. |
| 283 | * Completion Commands:: A list of completion commands. | 283 | * Completion Commands:: A list of completion commands. |
| 284 | * Strict Completion:: Different types of completion. | 284 | * Strict Completion:: Different types of completion. |
| 285 | * Completion Styles:: How completion matches are chosen. | ||
| 285 | * Completion Options:: Options for completion. | 286 | * Completion Options:: Options for completion. |
| 286 | 287 | ||
| 287 | Help | 288 | Help |
| @@ -291,10 +292,10 @@ Help | |||
| 291 | * Name Help:: Asking about a command, variable or function name. | 292 | * Name Help:: Asking about a command, variable or function name. |
| 292 | * Apropos:: Asking what pertains to a given topic. | 293 | * Apropos:: Asking what pertains to a given topic. |
| 293 | * Help Mode:: Special features of Help mode and Help buffers. | 294 | * Help Mode:: Special features of Help mode and Help buffers. |
| 294 | * Library Keywords:: Finding Lisp libraries by keywords (topics). | 295 | * Package Keywords:: Finding Lisp libraries by keywords (topics). |
| 295 | * Language Help:: Help relating to international language support. | 296 | * Language Help:: Help relating to international language support. |
| 296 | * Misc Help:: Other help commands. | 297 | * Misc Help:: Other help commands. |
| 297 | * Help Files:: Commands to display pre-written help files. | 298 | * Help Files:: Commands to display auxilliary help files. |
| 298 | * Help Echo:: Help on active text and tooltips (`balloon help'). | 299 | * Help Echo:: Help on active text and tooltips (`balloon help'). |
| 299 | 300 | ||
| 300 | The Mark and the Region | 301 | The Mark and the Region |
diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi index 3c4a74c02b5..4a76f206aed 100644 --- a/doc/emacs/entering.texi +++ b/doc/emacs/entering.texi | |||
| @@ -19,49 +19,45 @@ | |||
| 19 | 19 | ||
| 20 | The usual way to invoke Emacs is with the shell command | 20 | The usual way to invoke Emacs is with the shell command |
| 21 | @command{emacs}. From a terminal window running in the X Window | 21 | @command{emacs}. From a terminal window running in the X Window |
| 22 | System, you can also run Emacs in the background with | 22 | System, you can run Emacs in the background with @command{emacs &}; |
| 23 | @command{emacs&}; this way, Emacs won't tie up the terminal window, so | 23 | this way, Emacs won't tie up the terminal window, so you can use it to |
| 24 | you can use it to run other shell commands. | 24 | run other shell commands. |
| 25 | 25 | ||
| 26 | @cindex startup screen | 26 | @cindex startup screen |
| 27 | When Emacs starts up, the initial frame displays a special buffer | 27 | When Emacs starts up, the initial frame displays a special buffer |
| 28 | named @samp{*GNU Emacs*}. This buffer contains some information about | 28 | named @samp{*GNU Emacs*}. This @dfn{startup screen} contains |
| 29 | Emacs, and includes @dfn{links} to common tasks that might be useful | 29 | information about Emacs and @dfn{links} to common tasks that are |
| 30 | to beginning users. For instance, activating the @samp{Emacs | 30 | useful for beginning users. For instance, activating the @samp{Emacs |
| 31 | Tutorial} link opens the Emacs tutorial; this does the same thing as | 31 | Tutorial} link opens the Emacs tutorial; this does the same thing as |
| 32 | the command @kbd{C-h t} (@code{help-with-tutorial}). To activate a | 32 | the command @kbd{C-h t} (@code{help-with-tutorial}). To activate a |
| 33 | link, either move point onto it and type @kbd{@key{RET}}, or click on | 33 | link, either move point onto it and type @kbd{@key{RET}}, or click on |
| 34 | it with @kbd{mouse-1} (the left mouse button). | 34 | it with @kbd{mouse-1} (the left mouse button). |
| 35 | 35 | ||
| 36 | Using a command line argument, you can tell Emacs to visit one or | 36 | Using a command line argument, you can tell Emacs to visit one or |
| 37 | more specific files as soon as it starts up. For example, | 37 | more files as soon as it starts up. For example, @command{emacs |
| 38 | @command{emacs foo.txt} starts Emacs with a buffer displaying the | 38 | foo.txt} starts Emacs with a buffer displaying the contents of the |
| 39 | contents of the file @samp{foo.txt}. This feature exists mainly for | 39 | file @samp{foo.txt}. This feature exists mainly for compatibility |
| 40 | compatibility with other editors, which are designed to edit one file | 40 | with other editors, which are designed to be launched from the shell |
| 41 | at a time: once you are done with that file, you exit the editor, and | 41 | for short editing sessions. If you call Emacs this way, the initial |
| 42 | start it again the next time you need it. | 42 | frame is split into two windows---one showing the specified file, and |
| 43 | 43 | the other showing the startup screen. @xref{Windows}. | |
| 44 | Using Emacs in this way---starting it afresh each time you want to | 44 | |
| 45 | edit a file---is unnecessary and wasteful. Emacs can visit more than | 45 | Generally, it is unnecessary and wasteful to start Emacs afresh each |
| 46 | one file in a single editing session, and exiting the Emacs session | 46 | time you want to edit a file. The recommended way to use Emacs is to |
| 47 | loses valuable accumulated context, such as the kill ring, registers, | 47 | start it just once, just after you log in, and do all your editing in |
| 48 | undo history, and mark ring. These features, described later in the | 48 | the same Emacs session. @xref{Files}, for information on visiting |
| 49 | manual, are useful for performing edits across multiple files, or | 49 | more than one file. If you use Emacs this way, the Emacs session |
| 50 | continuing edits to a single file. | 50 | accumulates valuable context, such as the kill ring, registers, undo |
| 51 | 51 | history, and mark ring data, which together make editing more | |
| 52 | The recommended way to use Emacs is to start it only once, just | 52 | convenient. These features are described later in the manual. |
| 53 | after you log in, and do all your editing in the same Emacs session. | ||
| 54 | Each time you edit a file, visit it with the existing Emacs, which | ||
| 55 | eventually has many files in it ready for editing. @xref{Files}, for | ||
| 56 | more information on visiting more than one file. | ||
| 57 | 53 | ||
| 58 | To edit a file from another program while Emacs is running, you can | 54 | To edit a file from another program while Emacs is running, you can |
| 59 | use the @command{emacsclient} helper program to open a file in the | 55 | use the @command{emacsclient} helper program to open a file in the |
| 60 | already running Emacs. @xref{Emacs Server}. | 56 | existing Emacs session. @xref{Emacs Server}. |
| 61 | 57 | ||
| 62 | Emacs accepts other command line arguments that tell it to load | 58 | Emacs accepts other command line arguments that tell it to load |
| 63 | certain Lisp files, call certain functions, and so forth. These | 59 | certain Lisp files, where to put the initial frame, and so forth. |
| 64 | features exist mainly for advanced users. @xref{Emacs Invocation}. | 60 | @xref{Emacs Invocation}. |
| 65 | 61 | ||
| 66 | @vindex inhibit-startup-screen | 62 | @vindex inhibit-startup-screen |
| 67 | If the variable @code{inhibit-startup-screen} is non-@code{nil}, | 63 | If the variable @code{inhibit-startup-screen} is non-@code{nil}, |
| @@ -72,11 +68,10 @@ which can be used to evaluate Emacs Lisp expressions interactively. | |||
| 72 | @xref{Lisp Interaction}. You can set the variable | 68 | @xref{Lisp Interaction}. You can set the variable |
| 73 | @code{inhibit-startup-screen} using the Customize facility | 69 | @code{inhibit-startup-screen} using the Customize facility |
| 74 | (@pxref{Easy Customization}), or by editing your initialization file | 70 | (@pxref{Easy Customization}), or by editing your initialization file |
| 75 | (@pxref{Init File}).@footnote{Note that setting | 71 | (@pxref{Init File}).@footnote{Setting @code{inhibit-startup-screen} in |
| 76 | @code{inhibit-startup-screen} in @file{site-start.el} doesn't work, | 72 | @file{site-start.el} doesn't work, because the startup screen is set |
| 77 | because the startup screen is set up before reading | 73 | up before reading @file{site-start.el}. @xref{Init File}, for |
| 78 | @file{site-start.el}. @xref{Init File}, for information about | 74 | information about @file{site-start.el}.} |
| 79 | @file{site-start.el}.} | ||
| 80 | 75 | ||
| 81 | You can also force Emacs to display a file or directory at startup | 76 | You can also force Emacs to display a file or directory at startup |
| 82 | by setting the variable @code{initial-buffer-choice} to a | 77 | by setting the variable @code{initial-buffer-choice} to a |
| @@ -105,13 +100,13 @@ On a text terminal, suspend Emacs; on a graphical display, | |||
| 105 | @findex save-buffers-kill-terminal | 100 | @findex save-buffers-kill-terminal |
| 106 | @dfn{Killing} Emacs means terminating the Emacs program. To do | 101 | @dfn{Killing} Emacs means terminating the Emacs program. To do |
| 107 | this, type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}). A | 102 | this, type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}). A |
| 108 | two-character key is used to make it harder to type by accident. If | 103 | two-character key sequence is used to make it harder to type by |
| 109 | there are any modified file-visiting buffers when you type @kbd{C-x | 104 | accident. If there are any modified file-visiting buffers when you |
| 110 | C-c}, Emacs first offers to save these buffers. If you do not save | 105 | type @kbd{C-x C-c}, Emacs first offers to save these buffers. If you |
| 111 | them all, it asks for confirmation again, since the unsaved changes | 106 | do not save them all, it asks for confirmation again, since the |
| 112 | will be lost. Emacs also asks for confirmation if any subprocesses | 107 | unsaved changes will be lost. Emacs also asks for confirmation if any |
| 113 | are still running, since killing Emacs will also kill the subprocesses | 108 | subprocesses are still running, since killing Emacs will also kill the |
| 114 | (@pxref{Shell}). | 109 | subprocesses (@pxref{Shell}). |
| 115 | 110 | ||
| 116 | @kbd{C-x C-c} behaves specially if you are using Emacs as a server. | 111 | @kbd{C-x C-c} behaves specially if you are using Emacs as a server. |
| 117 | If you type it from a ``client frame'', it closes the client | 112 | If you type it from a ``client frame'', it closes the client |
| @@ -135,39 +130,19 @@ default value of @code{confirm-kill-emacs} is @code{nil}. | |||
| 135 | To kill Emacs without being prompted about saving, type @kbd{M-x | 130 | To kill Emacs without being prompted about saving, type @kbd{M-x |
| 136 | kill-emacs}. | 131 | kill-emacs}. |
| 137 | 132 | ||
| 138 | @cindex minimizing a frame | ||
| 139 | @cindex iconifying | ||
| 140 | @cindex suspending | ||
| 141 | You can ``exit'' Emacs in two other ways. On a graphical display, | ||
| 142 | you can @dfn{minimize} (or @dfn{iconify}) an Emacs frame; depending on | ||
| 143 | the window system, this either replaces the Emacs frame with a tiny | ||
| 144 | ``icon'' or conceals the frame entirely (@pxref{Frames}). On a | ||
| 145 | text-only terminal, you can @dfn{suspend} Emacs; this means stopping | ||
| 146 | the Emacs program temporarily, returning control to its parent process | ||
| 147 | (usually a shell). | ||
| 148 | |||
| 149 | @kindex C-z | 133 | @kindex C-z |
| 150 | @findex suspend-frame | 134 | @findex suspend-frame |
| 135 | @cindex minimizing | ||
| 136 | @cindex iconifying | ||
| 137 | @cindex suspending | ||
| 151 | @kbd{C-z} runs the command @code{suspend-frame}. On a graphical | 138 | @kbd{C-z} runs the command @code{suspend-frame}. On a graphical |
| 152 | display, this ``minimizes'' (or ``iconifies'') the selected Emacs | 139 | display, this command @dfn{minimizes} (or @dfn{iconifies}) the |
| 153 | frame. On a text terminal, this suspends the Emacs process. | 140 | selected Emacs frame, hiding it in a way that lets you bring it back |
| 154 | 141 | later (exactly how this hiding occurs depends on the window system). | |
| 155 | After minimizing or suspending Emacs, you can return to it and | 142 | On a text terminal, the @kbd{C-z} command @dfn{suspends} Emacs, |
| 156 | continue editing wherever you left off. The way to do this depends on | 143 | stopping the program temporarily and returning control to the parent |
| 157 | the window system or shell. In most common shells, you can resume | 144 | process (usually a shell); in most shells, you can resume Emacs after |
| 158 | Emacs after suspending it with the shell command @command{%emacs}. | 145 | suspending it with the shell command @command{%emacs}. |
| 159 | |||
| 160 | @vindex cannot-suspend | ||
| 161 | On very old systems that don't support suspending programs, | ||
| 162 | @kbd{C-z} starts an inferior shell that communicates directly with the | ||
| 163 | terminal, and Emacs waits until you exit the subshell. (The way to | ||
| 164 | exit the subshell is usually @kbd{C-d} or @command{exit}.) On these | ||
| 165 | systems, you can only get back to the shell from which Emacs was run | ||
| 166 | (to log out, for example) when you kill Emacs. Suspending can also | ||
| 167 | fail if you run Emacs under a shell that doesn't support suspending | ||
| 168 | jobs, even if the system itself does support it. In this case, you | ||
| 169 | can set the variable @code{cannot-suspend} to a non-@code{nil} value | ||
| 170 | to force @kbd{C-z} to start an inferior shell. | ||
| 171 | 146 | ||
| 172 | Text-only terminals usually listen for certain special characters | 147 | Text-only terminals usually listen for certain special characters |
| 173 | whose meaning is to kill or suspend the program you are running. | 148 | whose meaning is to kill or suspend the program you are running. |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 2672c30363b..433bf617598 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -54,11 +54,13 @@ Note that file name completion ignores file names whose extensions | |||
| 54 | appear in the variable @code{completion-ignored-extensions} | 54 | appear in the variable @code{completion-ignored-extensions} |
| 55 | (@pxref{Completion Options}). | 55 | (@pxref{Completion Options}). |
| 56 | 56 | ||
| 57 | @cindex default file name | ||
| 57 | For most operations, there is a @dfn{default file name} which is | 58 | For most operations, there is a @dfn{default file name} which is |
| 58 | used if you type just @key{RET} to enter an empty argument. Normally, | 59 | used if you type just @key{RET} to enter an empty argument. Normally, |
| 59 | the default file name is the name of the file visited in the current | 60 | the default file name is the name of the file visited in the current |
| 60 | buffer. | 61 | buffer. |
| 61 | 62 | ||
| 63 | @cindex default directory | ||
| 62 | @vindex default-directory | 64 | @vindex default-directory |
| 63 | @vindex insert-default-directory | 65 | @vindex insert-default-directory |
| 64 | Each buffer has a @dfn{default directory} which is normally the same | 66 | Each buffer has a @dfn{default directory} which is normally the same |
| @@ -1863,7 +1865,7 @@ then specifying @file{/tmp/foo*bar} will visit only | |||
| 1863 | @cindex file name caching | 1865 | @cindex file name caching |
| 1864 | @cindex cache of file names | 1866 | @cindex cache of file names |
| 1865 | @pindex find | 1867 | @pindex find |
| 1866 | @kindex C-@key{TAB} | 1868 | @kindex C-TAB |
| 1867 | @findex file-cache-minibuffer-complete | 1869 | @findex file-cache-minibuffer-complete |
| 1868 | You can use the @dfn{file name cache} to make it easy to locate a | 1870 | You can use the @dfn{file name cache} to make it easy to locate a |
| 1869 | file by name, without having to remember exactly where it is located. | 1871 | file by name, without having to remember exactly where it is located. |
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 619252503a9..fc78f90db15 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -1229,8 +1229,7 @@ raises the frame. | |||
| 1229 | 1229 | ||
| 1230 | @node Non-Window Terminals | 1230 | @node Non-Window Terminals |
| 1231 | @section Non-Window Terminals | 1231 | @section Non-Window Terminals |
| 1232 | @cindex non-window terminals | 1232 | @cindex text-only terminal |
| 1233 | @cindex single-frame terminals | ||
| 1234 | 1233 | ||
| 1235 | On a text-only terminal, Emacs can display only one Emacs frame at a | 1234 | On a text-only terminal, Emacs can display only one Emacs frame at a |
| 1236 | time. However, you can still create multiple Emacs frames, and switch | 1235 | time. However, you can still create multiple Emacs frames, and switch |
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 9ff995138f5..a85edf101e5 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -11,31 +11,19 @@ | |||
| 11 | @kindex C-h | 11 | @kindex C-h |
| 12 | @kindex F1 | 12 | @kindex F1 |
| 13 | 13 | ||
| 14 | Emacs provides extensive help features, all accessible through the | ||
| 15 | @dfn{help character}, @kbd{C-h}. This is a prefix key that is used | ||
| 16 | for commands that display documentation; the next character you type | ||
| 17 | should be a @dfn{help option}, to ask for a particular kind of help. | ||
| 18 | You can cancel the @kbd{C-h} command with @kbd{C-g}. The function key | ||
| 19 | @key{F1} is equivalent to @kbd{C-h}. | ||
| 20 | |||
| 21 | @kindex C-h C-h | 14 | @kindex C-h C-h |
| 22 | @findex help-for-help | 15 | @findex help-for-help |
| 23 | @kbd{C-h} itself is one of the help options; @kbd{C-h C-h} displays | 16 | Emacs provides a wide variety of help commands, all accessible |
| 24 | a list of help options, with a brief description of each one | 17 | through the prefix key @kbd{C-h} (or, equivalently, the function key |
| 25 | (@code{help-for-help}). You can scroll the list with @key{SPC} and | 18 | @key{F1}). These help commands are described in the following |
| 26 | @key{DEL}, then type the help option you want. To cancel, type | 19 | sections. You can also type @kbd{C-h C-h} to view a list of help |
| 27 | @kbd{C-g}. | 20 | commands (@code{help-for-help}). You can scroll the list with |
| 28 | 21 | @key{SPC} and @key{DEL}, then type the help command you want. To | |
| 29 | @kbd{C-h} or @key{F1} means ``help'' in various other contexts as | 22 | cancel, type @kbd{C-g}. |
| 30 | well. For instance, you can type them after a prefix key to display | 23 | |
| 31 | a list of the keys that can follow the prefix key. (A few prefix keys | 24 | Many help commands display their information in a special @dfn{help |
| 32 | don't support @kbd{C-h} in this way, because they define other | 25 | buffer}. In this buffer, you can type @key{SPC} and @key{DEL} to |
| 33 | meanings for it, but they all support @key{F1} for help.) | 26 | scroll and type @key{RET} to follow hyperlinks. @xref{Help Mode}. |
| 34 | |||
| 35 | Most help buffers use a special major mode, Help mode, which lets | ||
| 36 | you scroll conveniently with @key{SPC} and @key{DEL}. You can also | ||
| 37 | follow hyperlinks to URLs, and to other facilities including Info | ||
| 38 | nodes and customization buffers. @xref{Help Mode}. | ||
| 39 | 27 | ||
| 40 | @cindex searching documentation efficiently | 28 | @cindex searching documentation efficiently |
| 41 | @cindex looking for a subject in documentation | 29 | @cindex looking for a subject in documentation |
| @@ -51,33 +39,38 @@ This searches for commands whose names match the argument | |||
| 51 | regular expression (@pxref{Regexps}). @xref{Apropos}. | 39 | regular expression (@pxref{Regexps}). @xref{Apropos}. |
| 52 | 40 | ||
| 53 | @item C-h i d m emacs @key{RET} i @var{topic} @key{RET} | 41 | @item C-h i d m emacs @key{RET} i @var{topic} @key{RET} |
| 54 | This searches for @var{topic} in the indices of the on-line Emacs | 42 | This searches for @var{topic} in the indices of the Emacs Info manual, |
| 55 | manual, and displays the first match found. Press @kbd{,} to see | 43 | displaying the first match found. Press @kbd{,} to see subsequent |
| 56 | subsequent matches. You can use a regular expression as @var{topic}. | 44 | matches. You can use a regular expression as @var{topic}. |
| 57 | 45 | ||
| 58 | @item C-h i d m emacs @key{RET} s @var{topic} @key{RET} | 46 | @item C-h i d m emacs @key{RET} s @var{topic} @key{RET} |
| 59 | Similar, but searches the @emph{text} of the manual rather than the | 47 | Similar, but searches the @emph{text} of the manual rather than the |
| 60 | indices. | 48 | indices. |
| 61 | 49 | ||
| 62 | @item C-h C-f | 50 | @item C-h C-f |
| 63 | This displays the Emacs FAQ. You can use the Info commands | 51 | This displays the Emacs FAQ, using Info. |
| 64 | to browse it. | ||
| 65 | 52 | ||
| 66 | @item C-h p | 53 | @item C-h p |
| 67 | This displays the available Emacs packages based on keywords. | 54 | This displays the available Emacs packages based on keywords. |
| 68 | @xref{Library Keywords}. | 55 | @xref{Package Keywords}. |
| 69 | @end table | 56 | @end table |
| 70 | 57 | ||
| 58 | @kbd{C-h} or @key{F1} means ``help'' in various other contexts as | ||
| 59 | well. For instance, you can type them after a prefix key to view a | ||
| 60 | list of the keys that can follow the prefix key. (A few prefix keys | ||
| 61 | don't support @kbd{C-h} in this way, because they define other | ||
| 62 | meanings for it, but they all support @key{F1} for help.) | ||
| 63 | |||
| 71 | @menu | 64 | @menu |
| 72 | * Help Summary:: Brief list of all Help commands. | 65 | * Help Summary:: Brief list of all Help commands. |
| 73 | * Key Help:: Asking what a key does in Emacs. | 66 | * Key Help:: Asking what a key does in Emacs. |
| 74 | * Name Help:: Asking about a command, variable or function name. | 67 | * Name Help:: Asking about a command, variable or function name. |
| 75 | * Apropos:: Asking what pertains to a given topic. | 68 | * Apropos:: Asking what pertains to a given topic. |
| 76 | * Help Mode:: Special features of Help mode and Help buffers. | 69 | * Help Mode:: Special features of Help mode and Help buffers. |
| 77 | * Library Keywords:: Finding Lisp libraries by keywords (topics). | 70 | * Package Keywords:: Finding Lisp libraries by keywords (topics). |
| 78 | * Language Help:: Help relating to international language support. | 71 | * Language Help:: Help relating to international language support. |
| 79 | * Misc Help:: Other help commands. | 72 | * Misc Help:: Other help commands. |
| 80 | * Help Files:: Commands to display pre-written help files. | 73 | * Help Files:: Commands to display auxilliary help files. |
| 81 | * Help Echo:: Help on active text and tooltips (`balloon help'). | 74 | * Help Echo:: Help on active text and tooltips (`balloon help'). |
| 82 | @end menu | 75 | @end menu |
| 83 | 76 | ||
| @@ -89,21 +82,20 @@ This displays the available Emacs packages based on keywords. | |||
| 89 | @section Help Summary | 82 | @section Help Summary |
| 90 | @end ifnottex | 83 | @end ifnottex |
| 91 | 84 | ||
| 92 | Here is a summary of the Emacs interactive help commands. (The | 85 | Here is a summary of help commands for accessing the built-in |
| 93 | character that follows @kbd{C-h} is the ``help option.'') See | 86 | documentation. Most of these are described in more detail in the |
| 94 | @ref{Help Files}, for other help commands that display fixed files | 87 | following sections. |
| 95 | of information. | ||
| 96 | 88 | ||
| 97 | @table @kbd | 89 | @table @kbd |
| 98 | @item C-h a @var{topics} @key{RET} | 90 | @item C-h a @var{topics} @key{RET} |
| 99 | Display a list of commands whose names match @var{topics} | 91 | Display a list of commands whose names match @var{topics} |
| 100 | (@code{apropos-command}; @pxref{Apropos}). | 92 | (@code{apropos-command}). |
| 101 | @item C-h b | 93 | @item C-h b |
| 102 | Display all active key bindings; minor mode bindings first, then those | 94 | Display all active key bindings; minor mode bindings first, then those |
| 103 | of the major mode, then global bindings (@code{describe-bindings}). | 95 | of the major mode, then global bindings (@code{describe-bindings}). |
| 104 | @item C-h c @var{key} | 96 | @item C-h c @var{key} |
| 105 | Given a key sequence @var{key}, show the name of the command that it | 97 | Show the name of the command that the key sequence @var{key} is bound |
| 106 | runs (@code{describe-key-briefly}). Here @kbd{c} stands for | 98 | to (@code{describe-key-briefly}). Here @kbd{c} stands for |
| 107 | ``character.'' For more extensive information on @var{key}, use | 99 | ``character.'' For more extensive information on @var{key}, use |
| 108 | @kbd{C-h k}. | 100 | @kbd{C-h k}. |
| 109 | @item C-h d @var{topics} @key{RET} | 101 | @item C-h d @var{topics} @key{RET} |
| @@ -120,8 +112,8 @@ this works for commands too. | |||
| 120 | Display the @file{HELLO} file, which shows examples of various character | 112 | Display the @file{HELLO} file, which shows examples of various character |
| 121 | sets. | 113 | sets. |
| 122 | @item C-h i | 114 | @item C-h i |
| 123 | Run Info, the GNU documentation browser (@code{info}). | 115 | Run Info, the GNU documentation browser (@code{info}). The Emacs |
| 124 | The complete Emacs manual is available on-line in Info. | 116 | manual is available in Info. |
| 125 | @item C-h k @var{key} | 117 | @item C-h k @var{key} |
| 126 | Display the name and documentation of the command that @var{key} runs | 118 | Display the name and documentation of the command that @var{key} runs |
| 127 | (@code{describe-key}). | 119 | (@code{describe-key}). |
| @@ -134,20 +126,18 @@ Display documentation of the current major mode (@code{describe-mode}). | |||
| 134 | Display news of recent Emacs changes (@code{view-emacs-news}). | 126 | Display news of recent Emacs changes (@code{view-emacs-news}). |
| 135 | @item C-h p | 127 | @item C-h p |
| 136 | Find packages by topic keyword (@code{finder-by-keyword}). This lists | 128 | Find packages by topic keyword (@code{finder-by-keyword}). This lists |
| 137 | packages using a package menu buffer (@pxref{Package Menu}); for an | 129 | packages using a package menu buffer. @xref{Packages}. |
| 138 | alternative interface to the same information, try the | ||
| 139 | @code{info-finder} command. | ||
| 140 | @item C-h P @var{package} @key{RET} | 130 | @item C-h P @var{package} @key{RET} |
| 141 | Display documentation about the package named @var{package} | 131 | Display documentation about the package named @var{package} |
| 142 | (@code{describe-package}; @pxref{Packages}). | 132 | (@code{describe-package}). |
| 143 | @item C-h r | 133 | @item C-h r |
| 144 | Display the Emacs manual in Info (@code{info-emacs-manual}). | 134 | Display the Emacs manual in Info (@code{info-emacs-manual}). |
| 145 | @item C-h s | 135 | @item C-h s |
| 146 | Display the current contents of the @dfn{syntax table}, with an | 136 | Display the contents of the current @dfn{syntax table} |
| 147 | explanation of what they mean (@code{describe-syntax}). The syntax | 137 | (@code{describe-syntax}). The syntax table says which characters are |
| 148 | table says which characters are opening delimiters, which are parts of | 138 | opening delimiters, which are parts of words, and so on. @xref{Syntax |
| 149 | words, which are string quotes, and so on. @xref{Syntax Tables,, | 139 | Tables,, Syntax Tables, elisp, The Emacs Lisp Reference Manual}, for |
| 150 | Syntax Tables, elisp, The Emacs Lisp Reference Manual}, for details. | 140 | details. |
| 151 | @item C-h t | 141 | @item C-h t |
| 152 | Enter the Emacs interactive tutorial (@code{help-with-tutorial}). | 142 | Enter the Emacs interactive tutorial (@code{help-with-tutorial}). |
| 153 | @item C-h v @var{var} @key{RET} | 143 | @item C-h v @var{var} @key{RET} |
| @@ -184,27 +174,27 @@ Display the help message for a special text area, if point is in one | |||
| 184 | @node Key Help | 174 | @node Key Help |
| 185 | @section Documentation for a Key | 175 | @section Documentation for a Key |
| 186 | 176 | ||
| 187 | @kindex C-h c | ||
| 188 | @findex describe-key-briefly | 177 | @findex describe-key-briefly |
| 178 | @findex describe-key | ||
| 189 | The help commands to get information about a key sequence are | 179 | The help commands to get information about a key sequence are |
| 190 | @kbd{C-h c} and @w{@kbd{C-h k}}. @kbd{C-h c @var{key}} displays in | 180 | @kbd{C-h c} (@code{describe-key-briefly}) and @kbd{C-h k} |
| 191 | the echo area the name of the command that @var{key} is bound to. For | 181 | (@code{describe-key}). |
| 192 | example, @kbd{C-h c C-f} displays @samp{forward-char}. Since command | 182 | |
| 193 | names are chosen to describe what the commands do, this gives you a | 183 | @kindex C-h c |
| 194 | very brief description of what @var{key} does. | 184 | @kbd{C-h c @var{key}} displays in the echo area the name of the |
| 185 | command that @var{key} is bound to. For example, @kbd{C-h c C-f} | ||
| 186 | displays @samp{forward-char}. | ||
| 195 | 187 | ||
| 188 | @cindex documentation string | ||
| 196 | @kindex C-h k | 189 | @kindex C-h k |
| 197 | @findex describe-key | ||
| 198 | @kbd{C-h k @var{key}} is similar but gives more information: it | 190 | @kbd{C-h k @var{key}} is similar but gives more information: it |
| 199 | displays the documentation string of the command as well as its name. | 191 | displays a help buffer containing the command's @dfn{documentation |
| 200 | It displays this information in a window, since it may not fit in the | 192 | string}, which describes exactly what the command does. |
| 201 | echo area. | ||
| 202 | 193 | ||
| 203 | @kindex C-h K | 194 | @kindex C-h K |
| 204 | @findex Info-goto-emacs-key-command-node | 195 | @findex Info-goto-emacs-key-command-node |
| 205 | To find the documentation of a key sequence @var{key}, type @kbd{C-h | 196 | @kbd{C-h K @var{key}} displays the section of the Emacs manual that |
| 206 | K @var{key}}. This displays the appropriate manual section which | 197 | describes the command corresponding to @var{key}. |
| 207 | contains the documentation of @var{key}. | ||
| 208 | 198 | ||
| 209 | @kbd{C-h c}, @kbd{C-h k} and @kbd{C-h K} work for any sort of key | 199 | @kbd{C-h c}, @kbd{C-h k} and @kbd{C-h K} work for any sort of key |
| 210 | sequences, including function keys, menus, and mouse events. For | 200 | sequences, including function keys, menus, and mouse events. For |
| @@ -271,14 +261,8 @@ the Lisp symbol around or before point, if that is the name of a | |||
| 271 | defined Lisp variable. @xref{Variables}. | 261 | defined Lisp variable. @xref{Variables}. |
| 272 | 262 | ||
| 273 | Help buffers that describe Emacs variables and functions normally | 263 | Help buffers that describe Emacs variables and functions normally |
| 274 | have hyperlinks to the corresponding source definition, if you have | 264 | have hyperlinks to the corresponding source code, if you have the |
| 275 | the source files installed. (@xref{Hyperlinking}.) If you know Lisp | 265 | source files installed (@pxref{Hyperlinking}). |
| 276 | (or C), this provides the ultimate documentation. If you don't know | ||
| 277 | Lisp, you should learn it. (The Introduction to Emacs Lisp | ||
| 278 | Programming, available from the FSF through fsf.org, is a good way to | ||
| 279 | get started.) If Emacs feels you are just @emph{using} it, treating | ||
| 280 | it as an object program, its feelings may be hurt. For real intimacy, | ||
| 281 | read the Emacs source code. | ||
| 282 | 266 | ||
| 283 | @kindex C-h F | 267 | @kindex C-h F |
| 284 | @findex Info-goto-emacs-command-node | 268 | @findex Info-goto-emacs-command-node |
| @@ -288,53 +272,58 @@ manuals, not just the Emacs manual, and finds the right one. | |||
| 288 | 272 | ||
| 289 | @node Apropos | 273 | @node Apropos |
| 290 | @section Apropos | 274 | @section Apropos |
| 275 | @cindex apropos | ||
| 291 | 276 | ||
| 292 | The @dfn{apropos} commands answer questions like, ``What are the | 277 | The @dfn{apropos} commands answer questions like, ``What are the |
| 293 | commands for working with files?'' More precisely, you specify an | 278 | commands for working with files?'' More precisely, you specify an |
| 294 | @dfn{apropos pattern}, which means either a word, a list of words, or | 279 | @dfn{apropos pattern}, which means either a word, a list of words, or |
| 295 | a regular expression. Each apropos command displays a list of items | 280 | a regular expression. |
| 296 | that match the pattern, in a separate buffer. | 281 | |
| 282 | Each of the following apropos commands reads an apropos pattern in | ||
| 283 | the minibuffer, searches for items that match the pattern, and | ||
| 284 | displays the results in a different window. | ||
| 297 | 285 | ||
| 298 | @table @kbd | 286 | @table @kbd |
| 299 | @item C-h a @var{pattern} @key{RET} | 287 | @item C-h a |
| 300 | Search for commands whose names match @var{pattern}. | 288 | @kindex C-h a |
| 289 | @findex apropos-command | ||
| 290 | Search for commands (@code{apropos-command}). With a prefix argument, | ||
| 291 | search for noninteractive functions too. | ||
| 301 | 292 | ||
| 302 | @item M-x apropos @key{RET} @var{pattern} @key{RET} | 293 | @item M-x apropos |
| 303 | Search for functions and variables whose names match @var{pattern}. | 294 | @findex apropos |
| 304 | Both interactive functions (commands) and noninteractive functions can | 295 | Search for functions and variables. Both interactive functions |
| 305 | be found by this command. | 296 | (commands) and noninteractive functions can be found by this. |
| 306 | 297 | ||
| 307 | @item M-x apropos-variable @key{RET} @var{pattern} @key{RET} | 298 | @item M-x apropos-variable |
| 308 | Search for user-option variables whose names match @var{pattern}. | 299 | @findex apropos-variable |
| 300 | Search for user-customizable variables. With a prefix argument, | ||
| 301 | search for non-customizable variables too. | ||
| 309 | 302 | ||
| 310 | @item M-x apropos-value @key{RET} @var{pattern} @key{RET} | 303 | @item M-x apropos-value |
| 311 | Search for functions whose definitions match @var{pattern}, and | 304 | @findex apropos-value |
| 312 | variables whose values match @var{pattern}. | 305 | Search for variables whose values match the specified pattern. With a |
| 306 | prefix argument, search also for functions with definitions matching | ||
| 307 | the pattern, and Lisp symbols with properties matching the pattern. | ||
| 313 | 308 | ||
| 314 | @item C-h d @var{pattern} @key{RET} | 309 | @item C-h d |
| 315 | Search for functions and variables whose @strong{documentation | 310 | @kindex C-h d |
| 316 | strings} match @var{pattern}. | 311 | @findex apropos-documentation |
| 312 | Search for functions and variables whose documentation strings match | ||
| 313 | the specified pattern (@code{apropos-documentation}). | ||
| 317 | @end table | 314 | @end table |
| 318 | 315 | ||
| 319 | @kindex C-h a | 316 | The simplest kind of apropos pattern is one word. Anything |
| 320 | @findex apropos-command | 317 | containing that word matches the pattern. Thus, to find commands that |
| 321 | @cindex apropos | 318 | work on files, type @kbd{C-h a file @key{RET}}. This displays a list |
| 322 | The simplest kind of apropos pattern is one word. Anything which | 319 | of all command names that contain @samp{file}, including |
| 323 | contains that word matches the pattern. Thus, to find the commands | ||
| 324 | that work on files, type @kbd{C-h a file @key{RET}}. This displays a | ||
| 325 | list of all command names that contain @samp{file}, including | ||
| 326 | @code{copy-file}, @code{find-file}, and so on. Each command name | 320 | @code{copy-file}, @code{find-file}, and so on. Each command name |
| 327 | comes with a brief description and a list of keys you can currently | 321 | comes with a brief description and a list of keys you can currently |
| 328 | invoke it with. In our example, it would say that you can invoke | 322 | invoke it with. In our example, it would say that you can invoke |
| 329 | @code{find-file} by typing @kbd{C-x C-f}. | 323 | @code{find-file} by typing @kbd{C-x C-f}. |
| 330 | 324 | ||
| 331 | The @kbd{a} in @kbd{C-h a} stands for ``Apropos''; @kbd{C-h a} | ||
| 332 | runs the command @code{apropos-command}. This command normally checks | ||
| 333 | only commands (interactive functions); if you specify a prefix | ||
| 334 | argument, it checks noninteractive functions as well. | ||
| 335 | |||
| 336 | For more information about a function definition, variable or symbol | 325 | For more information about a function definition, variable or symbol |
| 337 | property listed in the apropos buffer, you can click on it with | 326 | property listed in an apropos buffer, you can click on it with |
| 338 | @kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}. | 327 | @kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}. |
| 339 | 328 | ||
| 340 | When you specify more than one word in the apropos pattern, a name | 329 | When you specify more than one word in the apropos pattern, a name |
| @@ -362,160 +351,117 @@ mark, insert, yank, fill, indent, case, change, set, what, list, find, | |||
| 362 | view, describe, default. | 351 | view, describe, default. |
| 363 | @end quotation | 352 | @end quotation |
| 364 | 353 | ||
| 365 | @findex apropos | ||
| 366 | Use @kbd{M-x apropos} instead of @kbd{C-h a} to list all the Lisp | ||
| 367 | symbols that match an apropos pattern, not just the symbols that are | ||
| 368 | commands. This command does not list key bindings by default; specify | ||
| 369 | a numeric argument if you want it to list them. | ||
| 370 | |||
| 371 | @findex apropos-variable | ||
| 372 | Use @kbd{M-x apropos-variable} to list user-customizable variables | ||
| 373 | that match an apropos pattern. If you specify a prefix argument, it | ||
| 374 | lists all matching variables. | ||
| 375 | |||
| 376 | @kindex C-h d | ||
| 377 | @findex apropos-documentation | ||
| 378 | The @code{apropos-documentation} command is like @code{apropos} | ||
| 379 | except that it searches documentation strings instead of symbol names | ||
| 380 | for matches. | ||
| 381 | |||
| 382 | @findex apropos-value | ||
| 383 | The @code{apropos-value} command is like @code{apropos} except that | ||
| 384 | it searches variables' values for matches for the apropos pattern. | ||
| 385 | With a prefix argument, it also checks symbols' function definitions | ||
| 386 | and property lists. | ||
| 387 | |||
| 388 | @vindex apropos-do-all | 354 | @vindex apropos-do-all |
| 389 | If the variable @code{apropos-do-all} is non-@code{nil}, the apropos | 355 | If the variable @code{apropos-do-all} is non-@code{nil}, the apropos |
| 390 | commands always behave as if they had been given a prefix argument. | 356 | commands always behave as if they had been given a prefix argument. |
| 391 | 357 | ||
| 392 | @vindex apropos-sort-by-scores | 358 | @vindex apropos-sort-by-scores |
| 393 | @cindex apropos search results, order by score | 359 | @cindex apropos search results, order by score |
| 394 | By default, apropos lists the search results in alphabetical order. | ||
| 395 | If the variable @code{apropos-sort-by-scores} is non-@code{nil}, the | ||
| 396 | apropos commands try to guess the relevance of each result, and | ||
| 397 | display the most relevant ones first. | ||
| 398 | |||
| 399 | @vindex apropos-documentation-sort-by-scores | 360 | @vindex apropos-documentation-sort-by-scores |
| 400 | By default, apropos lists the search results for | 361 | By default, all apropos commands except @code{apropos-documentation} |
| 401 | @code{apropos-documentation} in order of relevance of the match. If | 362 | list their results in alphabetical order. If the variable |
| 402 | the variable @code{apropos-documentation-sort-by-scores} is | 363 | @code{apropos-sort-by-scores} is non-@code{nil}, these commands |
| 403 | @code{nil}, apropos lists the symbols found in alphabetical order. | 364 | instead try to guess the relevance of each result, and display the |
| 365 | most relevant ones first. The @code{apropos-documentation} command | ||
| 366 | lists its results in order of relevance by default; to list them in | ||
| 367 | alphabetical order, change the variable | ||
| 368 | @code{apropos-documentation-sort-by-scores} to @code{nil}. | ||
| 404 | 369 | ||
| 405 | @node Help Mode | 370 | @node Help Mode |
| 406 | @section Help Mode Commands | 371 | @section Help Mode Commands |
| 407 | 372 | ||
| 408 | Help buffers provide the same commands as View mode (@pxref{View | 373 | Help buffers provide the same commands as View mode (@pxref{View |
| 409 | Mode}), plus a few special commands of their own. | 374 | Mode}); for instance, @key{SPC} scrolls forward, and @key{DEL} scrolls |
| 375 | backward. A few special commands are also provided: | ||
| 410 | 376 | ||
| 411 | @table @kbd | 377 | @table @kbd |
| 412 | @item @key{SPC} | ||
| 413 | Scroll forward. | ||
| 414 | @item @key{DEL} | ||
| 415 | Scroll backward. | ||
| 416 | @item @key{RET} | 378 | @item @key{RET} |
| 417 | Follow a cross reference at point. | 379 | Follow a cross reference at point (@code{help-follow}). |
| 418 | @item @key{TAB} | 380 | @item @key{TAB} |
| 419 | Move point forward to the next cross reference. | 381 | Move point forward to the next hyperlink (@code{forward-button}). |
| 420 | @item S-@key{TAB} | 382 | @item S-@key{TAB} |
| 421 | Move point back to the previous cross reference. | 383 | Move point back to the previous hyperlink (@code{backward-button}). |
| 422 | @item Mouse-1 | 384 | @item Mouse-1 |
| 423 | @itemx Mouse-2 | 385 | @itemx Mouse-2 |
| 424 | Follow a cross reference that you click on. | 386 | Follow a hyperlink that you click on. |
| 425 | @item C-c C-c | 387 | @item C-c C-c |
| 426 | Show all documentation about the symbol at point. | 388 | Show all documentation about the symbol at point |
| 389 | (@code{help-follow-symbol}). | ||
| 390 | @item C-c C-b | ||
| 391 | Go back to the previous help topic (@code{help-go-back}). | ||
| 427 | @end table | 392 | @end table |
| 428 | 393 | ||
| 429 | When a function name (@pxref{M-x,, Running Commands by Name}), | 394 | @cindex hyperlink |
| 430 | variable name (@pxref{Variables}), or face name (@pxref{Faces}) | 395 | @findex help-follow |
| 431 | appears in the documentation, it normally appears inside paired | 396 | @findex help-go-back |
| 432 | single-quotes. To view the documentation of that command, variable or | 397 | @kindex RET @r{(Help mode)} |
| 433 | face, you can click on the name with @kbd{Mouse-1} or @kbd{Mouse-2}, | 398 | @kindex C-c C-b @r{(Help mode)} |
| 434 | or move point there and type @key{RET}. Use @kbd{C-c C-b} to retrace | 399 | When a function name, variable name, or face name (@pxref{Faces}) |
| 435 | your steps. | 400 | appears in the documentation in the help buffer, it is normally an |
| 401 | underlined @dfn{hyperlink}. To view the associated documentation, | ||
| 402 | move point there and type @key{RET} (@code{help-follow}), or click on | ||
| 403 | the hyperlink with @kbd{Mouse-1} or @kbd{Mouse-2}. Doing so replaces | ||
| 404 | the contents of the help buffer; to retrace your steps, type @kbd{C-c | ||
| 405 | C-b} (@code{help-go-back}). | ||
| 436 | 406 | ||
| 437 | @cindex URL, viewing in help | 407 | @cindex URL, viewing in help |
| 438 | @cindex help, viewing web pages | 408 | @cindex help, viewing web pages |
| 439 | @cindex viewing web pages in help | 409 | @cindex viewing web pages in help |
| 440 | @cindex web pages, viewing in help | 410 | @cindex web pages, viewing in help |
| 441 | @findex browse-url | 411 | @findex browse-url |
| 442 | You can follow cross references to URLs (web pages) also. This uses | 412 | A help buffer can also contain hyperlinks to Info manuals, source |
| 443 | the @code{browse-url} command to view the page in the browser you | 413 | code definitions, and URLs (web pages). The first two are opened in |
| 444 | choose. @xref{Browse-URL}. | 414 | Emacs, and the third using a web browser via the @code{browse-url} |
| 445 | 415 | command (@pxref{Browse-URL}). | |
| 446 | @kindex @key{TAB} @r{(Help mode)} | 416 | |
| 447 | @findex help-next-ref | 417 | @kindex TAB @r{(Help mode)} |
| 448 | @kindex S-@key{TAB} @r{(Help mode)} | 418 | @findex forward-button |
| 449 | @findex help-previous-ref | 419 | @kindex S-TAB @r{(Help mode)} |
| 450 | There are convenient commands to move point to cross references in | 420 | @findex backward-button |
| 451 | the help text. @key{TAB} (@code{help-next-ref}) moves point down to | 421 | In a help buffer, @key{TAB} (@code{forward-button}) moves point |
| 452 | the next cross reference. @kbd{S-@key{TAB}} moves up to the previous | 422 | forward to the next hyperlink, while @kbd{S-@key{TAB}} |
| 453 | cross reference (@code{help-previous-ref}). | 423 | (@code{backward-button}) point back to the previous hyperlink. These |
| 454 | 424 | commands act cyclically; for instance, typing @key{TAB} at the last | |
| 455 | To view all documentation about any symbol name that appears in the | 425 | hyperlink moves back to the first hyperlink. |
| 456 | text, move point to the symbol name and type @kbd{C-c C-c} | 426 | |
| 457 | (@code{help-follow-symbol}). This shows all available documentation | 427 | To view all documentation about any symbol in the text, move point |
| 458 | about the symbol as a variable, function and/or face. As above, use | 428 | to there and type @kbd{C-c C-c} (@code{help-follow-symbol}). This |
| 459 | @kbd{C-c C-b} to retrace your steps. | 429 | shows all available documentation about the symbol---as a variable, |
| 460 | 430 | function and/or face. | |
| 461 | @node Library Keywords | 431 | |
| 462 | @section Keyword Search for Lisp Libraries | 432 | @node Package Keywords |
| 433 | @section Keyword Search for Packages | ||
| 434 | @cindex finder | ||
| 435 | |||
| 436 | Most optional features in Emacs are grouped into @dfn{packages}. | ||
| 437 | Emacs contains several hundred built-in packages, and more can be | ||
| 438 | installed over the network (@pxref{Packages}). | ||
| 463 | 439 | ||
| 464 | @kindex C-h p | 440 | @kindex C-h p |
| 465 | @findex finder-by-keyword | 441 | @findex finder-by-keyword |
| 466 | The @kbd{C-h p} command lets you search the standard Emacs Lisp | 442 | To make it easier to find packages related to a topic, most packages |
| 467 | libraries by topic keywords. Here is a partial list of keywords you can | 443 | are associated with one or more @dfn{keywords} based on what they do. |
| 468 | use: | 444 | Type @kbd{C-h p} (@code{finder-by-keyword}) to bring up a list of |
| 469 | 445 | package keywords, together with a description of what the keywords | |
| 470 | @multitable {convenience} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} | 446 | mean. To view a list of packages for a given keyword, type @key{RET} |
| 471 | @item abbrev@tab abbreviation handling, typing shortcuts, macros. | 447 | on that line; this displays the list of packages in a Package Menu |
| 472 | @item bib@tab code related to the @code{bib} bibliography processor. | 448 | buffer (@pxref{Package Menu}). |
| 473 | @item c@tab support for the C language and related languages. | 449 | |
| 474 | @item calendar@tab calendar and time management support. | 450 | @findex describe-package |
| 475 | @item comm@tab communications, networking, remote access to files. | 451 | @kindex C-h P |
| 476 | @item convenience@tab convenience features for faster editing. | 452 | @kbd{C-h P} (@code{describe-package}) prompts for the name of a |
| 477 | @item data@tab support for editing files of data. | 453 | package, and displays a help buffer describing the attributes of the |
| 478 | @item docs@tab support for Emacs documentation. | 454 | package and the features that it implements. |
| 479 | @item emulations@tab emulations of other editors. | ||
| 480 | @item extensions@tab Emacs Lisp language extensions. | ||
| 481 | @item faces@tab support for multiple fonts. | ||
| 482 | @item files@tab support for editing and manipulating files. | ||
| 483 | @item frames@tab support for Emacs frames and window systems. | ||
| 484 | @item games@tab games, jokes and amusements. | ||
| 485 | @item hardware@tab support for interfacing with exotic hardware. | ||
| 486 | @item help@tab support for on-line help systems. | ||
| 487 | @item hypermedia@tab support for links between text or other media types. | ||
| 488 | @item i18n@tab internationalization and alternate character-set support. | ||
| 489 | @item internal@tab code for Emacs internals, build process, defaults. | ||
| 490 | @item languages@tab specialized modes for editing programming languages. | ||
| 491 | @item lisp@tab Lisp support, including Emacs Lisp. | ||
| 492 | @item local@tab code local to your site. | ||
| 493 | @item maint@tab maintenance aids for the Emacs development group. | ||
| 494 | @item mail@tab modes for electronic-mail handling. | ||
| 495 | @item matching@tab various sorts of searching and matching. | ||
| 496 | @item mouse@tab mouse support. | ||
| 497 | @item multimedia@tab images and sound support. | ||
| 498 | @item news@tab support for netnews reading and posting. | ||
| 499 | @item oop@tab support for object-oriented programming. | ||
| 500 | @item outlines@tab support for hierarchical outlining. | ||
| 501 | @item processes@tab process, subshell, compilation, and job control support. | ||
| 502 | @item terminals@tab support for terminal types. | ||
| 503 | @item tex@tab supporting code for the @TeX{} formatter. | ||
| 504 | @item tools@tab programming tools. | ||
| 505 | @item unix@tab front-ends/assistants for, or emulators of, UNIX-like features. | ||
| 506 | @item wp@tab word processing. | ||
| 507 | @end multitable | ||
| 508 | 455 | ||
| 509 | @node Language Help | 456 | @node Language Help |
| 510 | @section Help for International Language Support | 457 | @section Help for International Language Support |
| 511 | 458 | ||
| 512 | You can use the command @kbd{C-h L} | 459 | For information on a specific language environment (@pxref{Language |
| 513 | (@code{describe-language-environment}) to get information about a | 460 | Environments}), type @kbd{C-h L} |
| 514 | specific language environment. @xref{Language Environments}. This | 461 | (@code{describe-language-environment}). This displays a help buffer |
| 515 | tells you which languages this language environment supports. It also | 462 | describing the languages supported by the language environment, and |
| 516 | lists the character sets, coding systems, and input methods that work | 463 | listing the associated character sets, coding systems, and input |
| 517 | with this language environment, and finally shows some sample text to | 464 | methods, as well as some sample text for that language environment. |
| 518 | illustrate scripts. | ||
| 519 | 465 | ||
| 520 | The command @kbd{C-h h} (@code{view-hello-file}) displays the file | 466 | The command @kbd{C-h h} (@code{view-hello-file}) displays the file |
| 521 | @file{etc/HELLO}, which shows how to say ``hello'' in many languages. | 467 | @file{etc/HELLO}, which shows how to say ``hello'' in many languages. |
| @@ -604,12 +550,11 @@ these is @key{ESC}, because @kbd{@key{ESC} C-h} is actually | |||
| 604 | @node Help Files | 550 | @node Help Files |
| 605 | @section Help Files | 551 | @section Help Files |
| 606 | 552 | ||
| 607 | The Emacs help commands described above display dynamic help based | 553 | Apart from the built-in documentation and manuals, Emacs contains |
| 608 | on the current state within Emacs, or refer to manuals. Other help | 554 | several other files describing topics like copying conditions, release |
| 609 | commands display pre-written, static help files. | 555 | notes, instructions for debugging and reporting bugs, and so forth. |
| 610 | 556 | You can use the following commands to view these files. Apart from | |
| 611 | Except for @kbd{C-h g}, these commands all have the form @kbd{C-h | 557 | @kbd{C-h g}, they all have the form @kbd{C-h C-@var{char}}. |
| 612 | C-@var{char}}; that is, @kbd{C-h} followed by a control character. | ||
| 613 | 558 | ||
| 614 | @kindex C-h C-c | 559 | @kindex C-h C-c |
| 615 | @findex describe-copying | 560 | @findex describe-copying |
| @@ -636,24 +581,23 @@ C-@var{char}}; that is, @kbd{C-h} followed by a control character. | |||
| 636 | 581 | ||
| 637 | @table @kbd | 582 | @table @kbd |
| 638 | @item C-h C-c | 583 | @item C-h C-c |
| 639 | Display the Emacs copying conditions (@code{describe-copying}). | 584 | Display the rules under which you can copy and redistribute Emacs |
| 640 | These are the rules under which you can copy and redistribute Emacs. | 585 | (@code{describe-copying}). |
| 641 | @item C-h C-d | 586 | @item C-h C-d |
| 642 | Display help for debugging Emacs (@code{view-emacs-debugging}). | 587 | Display help for debugging Emacs (@code{view-emacs-debugging}). |
| 643 | @item C-h C-e | 588 | @item C-h C-e |
| 644 | Display external packages and information about Emacs | 589 | Display information about where to get external packages |
| 645 | (@code{view-external-packages}). | 590 | (@code{view-external-packages}). |
| 646 | @item C-h C-f | 591 | @item C-h C-f |
| 647 | Display the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}). | 592 | Display the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}). |
| 648 | @item C-h g | 593 | @item C-h g |
| 649 | Display general information about the GNU Project | 594 | Display information about the GNU Project (@code{describe-gnu-project}). |
| 650 | (@code{describe-gnu-project}). | ||
| 651 | @item C-h C-m | 595 | @item C-h C-m |
| 652 | Display how to order printed copies of Emacs manuals | 596 | Display information about ordering printed copies of Emacs manuals |
| 653 | (@code{view-order-manuals}). | 597 | (@code{view-order-manuals}). |
| 654 | @item C-h C-n | 598 | @item C-h C-n |
| 655 | Display the Emacs ``news'' file, which lists new features in the most | 599 | Display the ``news'' file, which lists the new features in this |
| 656 | recent version of Emacs (@code{view-emacs-news}). | 600 | version of Emacs (@code{view-emacs-news}). |
| 657 | @item C-h C-o | 601 | @item C-h C-o |
| 658 | Display how to order or download the latest version of | 602 | Display how to order or download the latest version of |
| 659 | Emacs and other GNU software (@code{describe-distribution}). | 603 | Emacs and other GNU software (@code{describe-distribution}). |
| @@ -672,20 +616,20 @@ Emacs (@code{describe-no-warranty}). | |||
| 672 | 616 | ||
| 673 | @cindex tooltips | 617 | @cindex tooltips |
| 674 | @cindex balloon help | 618 | @cindex balloon help |
| 675 | When text on the screen is ``active'', so that it does something | 619 | In Emacs, stretches of ``active text'' (text that does something |
| 676 | special in response to mouse clicks or @kbd{RET}, it often has associated | 620 | special in response to mouse clicks or @key{RET}) often have |
| 677 | help text. For instance, most parts of the mode line have help text. On | 621 | associated help text. This includes hyperlinks in Emacs buffers, as |
| 678 | terminals that support mouse tracking, Emacs displays the help text as a | 622 | well as parts of the mode line. On graphical displays, as well as |
| 679 | ``tooltip'' (sometimes known as ``balloon help'') or in the echo area, | 623 | some text terminals which support mouse tracking, moving the mouse |
| 680 | whenever you leave the mouse stationary over the active text. | 624 | over the active text displays the help text as a @dfn{tooltip}. |
| 681 | @xref{Tooltips}. | 625 | @xref{Tooltips}. |
| 682 | 626 | ||
| 683 | @kindex C-h . | 627 | @kindex C-h . |
| 684 | @findex display-local-help | 628 | @findex display-local-help |
| 685 | @vindex help-at-pt-display-when-idle | 629 | @vindex help-at-pt-display-when-idle |
| 686 | If your terminal doesn't support mouse-tracking, you can display the | 630 | On terminals that don't support mouse-tracking, you can display the |
| 687 | help text for active buffer text using the keyboard. @kbd{C-h .} | 631 | help text for active buffer text at point by typing @kbd{C-h .} |
| 688 | (@code{display-local-help}) displays any help text associated with the | 632 | (@code{display-local-help}). This shows the help text in the echo |
| 689 | character after point, using the echo area. To display help text | 633 | area. To display help text automatically whenever it is available at |
| 690 | automatically whenever it is available on the character after point, set | 634 | point, set the variable @code{help-at-pt-display-when-idle} to |
| 691 | the variable @code{help-at-pt-display-when-idle} to @code{t}. | 635 | @code{t}. |
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index da1e88ab331..e84b4c9f080 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi | |||
| @@ -15,9 +15,9 @@ argument text. | |||
| 15 | 15 | ||
| 16 | @cindex prompt | 16 | @cindex prompt |
| 17 | When the minibuffer is in use, it appears in the echo area, with a | 17 | When the minibuffer is in use, it appears in the echo area, with a |
| 18 | cursor. The minibuffer display starts with a @dfn{prompt} in a | 18 | cursor. The minibuffer starts with a @dfn{prompt} in a distinct |
| 19 | distinct color, usually ending with a colon. The prompt states what | 19 | color, usually ending with a colon. The prompt states what kind of |
| 20 | kind of input is expected, and how it will be used. | 20 | input is expected, and how it will be used. |
| 21 | 21 | ||
| 22 | The simplest way to enter a minibuffer argument is to type the text, | 22 | The simplest way to enter a minibuffer argument is to type the text, |
| 23 | then @key{RET} to submit the argument and exit the minibuffer. You | 23 | then @key{RET} to submit the argument and exit the minibuffer. You |
| @@ -26,19 +26,17 @@ typing @kbd{C-g}. | |||
| 26 | 26 | ||
| 27 | @cindex default argument | 27 | @cindex default argument |
| 28 | Sometimes, a @dfn{default argument} appears in the prompt, inside | 28 | Sometimes, a @dfn{default argument} appears in the prompt, inside |
| 29 | parentheses before the colon. The default will be used as the | 29 | parentheses before the colon. This default will be used as the |
| 30 | argument value if you just type @key{RET}. For example, commands that | 30 | argument if you just type @key{RET}. For example, commands that read |
| 31 | read buffer names usually show a buffer name as the default; you can | 31 | buffer names usually show a buffer name as the default; you can type |
| 32 | type @key{RET} to operate on that default buffer. | 32 | @key{RET} to operate on that default buffer. |
| 33 | 33 | ||
| 34 | Since the minibuffer appears in the echo area, it can conflict with | 34 | Since the minibuffer appears in the echo area, it can conflict with |
| 35 | other uses of the echo area. If an error occurs while the minibuffer | 35 | other uses of the echo area. If an error message or an informative |
| 36 | is active, the error message hides the minibuffer for a few seconds, | 36 | message is emitted while the minibuffer is active, the message hides |
| 37 | or until you type something; then the minibuffer comes back. If a | 37 | the minibuffer for a few seconds, or until you type something; then |
| 38 | command such as @kbd{C-x =} needs to display a message in the echo | 38 | the minibuffer comes back. While the minibuffer is in use, keystrokes |
| 39 | area, the message hides the minibuffer for a few seconds, or until you | 39 | do not echo. |
| 40 | type something; then the minibuffer comes back. While the minibuffer | ||
| 41 | is in use, keystrokes do not echo. | ||
| 42 | 40 | ||
| 43 | @menu | 41 | @menu |
| 44 | * Minibuffer File:: Entering file names with the minibuffer. | 42 | * Minibuffer File:: Entering file names with the minibuffer. |
| @@ -52,6 +50,7 @@ is in use, keystrokes do not echo. | |||
| 52 | @node Minibuffer File | 50 | @node Minibuffer File |
| 53 | @section Minibuffers for File Names | 51 | @section Minibuffers for File Names |
| 54 | 52 | ||
| 53 | @cindex default directory | ||
| 55 | Commands such as @kbd{C-x C-f} (@code{find-file}) use the minibuffer | 54 | Commands such as @kbd{C-x C-f} (@code{find-file}) use the minibuffer |
| 56 | to read a file name argument (@pxref{Basic Files}). When the | 55 | to read a file name argument (@pxref{Basic Files}). When the |
| 57 | minibuffer is used to read a file name, it typically starts out with | 56 | minibuffer is used to read a file name, it typically starts out with |
| @@ -92,7 +91,7 @@ Emacs interprets a double slash as ``ignore everything before the | |||
| 92 | second slash in the pair.'' In the example above, | 91 | second slash in the pair.'' In the example above, |
| 93 | @file{/u2/emacs/src/} is ignored, so the argument you supplied is | 92 | @file{/u2/emacs/src/} is ignored, so the argument you supplied is |
| 94 | @file{/etc/termcap}. The ignored part of the file name is dimmed if | 93 | @file{/etc/termcap}. The ignored part of the file name is dimmed if |
| 95 | the terminal allows it (to disable this dimming, turn off File Name | 94 | the terminal allows it. (To disable this dimming, turn off File Name |
| 96 | Shadow mode with the command @kbd{M-x file-name-shadow-mode}.) | 95 | Shadow mode with the command @kbd{M-x file-name-shadow-mode}.) |
| 97 | 96 | ||
| 98 | @cindex home directory shorthand | 97 | @cindex home directory shorthand |
| @@ -108,11 +107,11 @@ directory name in front of the @file{~} is ignored: thus, | |||
| 108 | home directory, Emacs uses several alternatives. For MS-Windows, see | 107 | home directory, Emacs uses several alternatives. For MS-Windows, see |
| 109 | @ref{Windows HOME}; for MS-DOS, see | 108 | @ref{Windows HOME}; for MS-DOS, see |
| 110 | @ifnottex | 109 | @ifnottex |
| 111 | @ref{MS-DOS File Names, HOME on MS-DOS}. | 110 | @ref{MS-DOS File Names}. |
| 112 | @end ifnottex | 111 | @end ifnottex |
| 113 | @iftex | 112 | @iftex |
| 114 | @ref{MS-DOS File Names, HOME on MS-DOS,, emacs, the Emacs Manual}, in | 113 | @ref{MS-DOS File Names, HOME on MS-DOS,, emacs, the digital version of |
| 115 | the main Emacs manual. | 114 | the Emacs Manual}. |
| 116 | @end iftex | 115 | @end iftex |
| 117 | On these systems, the @file{~@var{user-id}/} construct is supported | 116 | On these systems, the @file{~@var{user-id}/} construct is supported |
| 118 | only for the current user, i.e., only if @var{user-id} is the current | 117 | only for the current user, i.e., only if @var{user-id} is the current |
| @@ -125,9 +124,8 @@ file names, change the variable @code{insert-default-directory} to | |||
| 125 | Nonetheless, relative file name arguments are still interpreted based | 124 | Nonetheless, relative file name arguments are still interpreted based |
| 126 | on the same default directory. | 125 | on the same default directory. |
| 127 | 126 | ||
| 128 | For rules how to read remote file names in the minibuffer, see | 127 | You can also enter remote file names in the minibuffer. |
| 129 | @ref{Filename completion, file name completion,, tramp}, in the Tramp | 128 | @xref{Remote Files}. |
| 130 | manual. | ||
| 131 | 129 | ||
| 132 | @node Minibuffer Edit | 130 | @node Minibuffer Edit |
| 133 | @section Editing in the Minibuffer | 131 | @section Editing in the Minibuffer |
| @@ -136,17 +134,17 @@ manual. | |||
| 136 | usual Emacs commands are available for editing the argument text. | 134 | usual Emacs commands are available for editing the argument text. |
| 137 | (The prompt, however, is @dfn{read-only}, and cannot be changed.) | 135 | (The prompt, however, is @dfn{read-only}, and cannot be changed.) |
| 138 | 136 | ||
| 139 | Since @key{RET} in the minibuffer is defined to exit the minibuffer, | 137 | Since @key{RET} in the minibuffer submits the argument, you can't |
| 140 | you can't use it to insert a newline in the minibuffer. To do that, | 138 | use it to insert a newline. You can do that with @kbd{C-q C-j}, which |
| 141 | type @kbd{C-o} or @kbd{C-q C-j}. (The newline character is really the | 139 | inserts a @kbd{C-j} control character, which is formally equivalent to |
| 142 | @acronym{ASCII} character control-J.) | 140 | a newline character (@pxref{Inserting Text}). Alternatively, you can |
| 141 | use the @kbd{C-o} (@code{open-line}) command (@pxref{Blank Lines}). | ||
| 143 | 142 | ||
| 144 | Inside a minibuffer, the keys @kbd{@key{TAB}}, @kbd{@key{SPC}}, and | 143 | Inside a minibuffer, the keys @key{TAB}, @key{SPC}, and @kbd{?} are |
| 145 | @kbd{@key{?}} are often bound to commands that perform | 144 | often bound to @dfn{completion commands}, which allow you to easily |
| 146 | @dfn{completion}. @xref{Completion}. You can use @kbd{C-q} | 145 | fill in the desired text without typing all of it. @xref{Completion}. |
| 147 | (@code{quoted-insert}) to insert a @key{TAB}, @key{SPC}, or @key{?} | 146 | As with @key{RET}, you can use @kbd{C-q} to insert a @key{TAB}, |
| 148 | character. For example, @kbd{C-q @key{TAB}} inserts a @key{TAB} | 147 | @key{SPC}, or @samp{?} character. |
| 149 | character. @xref{Inserting Text}. | ||
| 150 | 148 | ||
| 151 | For convenience, @kbd{C-a} (@code{move-beginning-of-line}) in a | 149 | For convenience, @kbd{C-a} (@code{move-beginning-of-line}) in a |
| 152 | minibuffer moves point to the beginning of the argument text, not the | 150 | minibuffer moves point to the beginning of the argument text, not the |
| @@ -203,35 +201,28 @@ set the variable @code{enable-recursive-minibuffers} to @code{t}. | |||
| 203 | @c it, the tutorial needs to be adjusted. | 201 | @c it, the tutorial needs to be adjusted. |
| 204 | @cindex completion | 202 | @cindex completion |
| 205 | 203 | ||
| 206 | Sometimes, you can use a feature called @dfn{completion} to help you | 204 | You can often use a feature called @dfn{completion} to help enter |
| 207 | enter arguments. This means that after you type part of the argument, | 205 | arguments. This means that after you type part of the argument, Emacs |
| 208 | Emacs can fill in the rest, or some of it, based on what you have | 206 | can fill in the rest, or some of it, based on what was typed so far. |
| 209 | typed so far. | ||
| 210 | 207 | ||
| 208 | @cindex completion alternative | ||
| 211 | When completion is available, certain keys (usually @key{TAB}, | 209 | When completion is available, certain keys (usually @key{TAB}, |
| 212 | @key{RET}, and @key{SPC}) are rebound to complete the text in the | 210 | @key{RET}, and @key{SPC}) are rebound in the minibuffer to special |
| 213 | minibuffer into a longer string chosen from a set of @dfn{completion | 211 | completion commands (@pxref{Completion Commands}). These commands |
| 214 | alternatives}. The set of completion alternatives depends on the | 212 | attempt to complete the text in the minibuffer, based on a set of |
| 215 | command that requested the argument, and on what you have typed so | 213 | @dfn{completion alternatives} provided by the command that requested |
| 216 | far. In addition, you can usually type @kbd{?} to display a list of | 214 | the argument. You can usually type @kbd{?} to see a list of |
| 217 | possible completions. | 215 | completion alternatives. |
| 218 | 216 | ||
| 219 | For example, @kbd{M-x} uses the minibuffer to read the name of a | 217 | Although completion is usually done in the minibuffer, the feature |
| 220 | command, so completion works by matching the minibuffer text against | 218 | is sometimes available in ordinary buffers too. @xref{Symbol |
| 221 | the names of existing Emacs commands. So, to run the command | 219 | Completion}. |
| 222 | @code{insert-buffer}, you can type @kbd{M-x ins @key{SPC} b @key{RET}} | ||
| 223 | instead of the full @kbd{M-x insert-buffer @key{RET}}. | ||
| 224 | |||
| 225 | Case is significant in completion when it is significant in the | ||
| 226 | argument you are entering, such as command names. Thus, | ||
| 227 | @samp{insert-buffer} is not a valid completion for @samp{IN}. | ||
| 228 | Completion ignores case distinctions for certain arguments in which | ||
| 229 | case does not matter. | ||
| 230 | 220 | ||
| 231 | @menu | 221 | @menu |
| 232 | * Example: Completion Example. Examples of using completion. | 222 | * Example: Completion Example. Examples of using completion. |
| 233 | * Commands: Completion Commands. A list of completion commands. | 223 | * Commands: Completion Commands. A list of completion commands. |
| 234 | * Strict Completion:: Different types of completion. | 224 | * Strict Completion:: Different types of completion. |
| 225 | * Completion Styles:: How completion matches are chosen. | ||
| 235 | * Options: Completion Options. Options for completion. | 226 | * Options: Completion Options. Options for completion. |
| 236 | @end menu | 227 | @end menu |
| 237 | 228 | ||
| @@ -239,24 +230,31 @@ case does not matter. | |||
| 239 | @subsection Completion Example | 230 | @subsection Completion Example |
| 240 | 231 | ||
| 241 | @kindex TAB @r{(completion)} | 232 | @kindex TAB @r{(completion)} |
| 242 | A concrete example may help here. If you type @kbd{M-x a u | 233 | A simple example may help here. @kbd{M-x} uses the minibuffer to |
| 243 | @key{TAB}}, the @key{TAB} looks for alternatives (in this case, | 234 | read the name of a command, so completion works by matching the |
| 244 | command names) that start with @samp{au}. There are several, | 235 | minibuffer text against the names of existing Emacs commands. Suppose |
| 245 | including @code{auto-fill-mode} and @code{autoconf-mode}, but they all | 236 | you wish to run the command @code{auto-fill-mode}. You can do that by |
| 246 | begin with @code{auto}, so the @samp{au} in the minibuffer completes | 237 | typing @kbd{M-x auto-fill-mode @key{RET}}, but it is easier to use |
| 247 | to @samp{auto}. | 238 | completion. |
| 239 | |||
| 240 | If you type @kbd{M-x a u @key{TAB}}, the @key{TAB} looks for | ||
| 241 | completion alternatives (in this case, command names) that start with | ||
| 242 | @samp{au}. There are several, including @code{auto-fill-mode} and | ||
| 243 | @code{autoconf-mode}, but they all begin with @code{auto}, so the | ||
| 244 | @samp{au} in the minibuffer completes to @samp{auto}. | ||
| 248 | 245 | ||
| 249 | If you type @key{TAB} again immediately, it cannot determine the | 246 | If you type @key{TAB} again immediately, it cannot determine the |
| 250 | next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it | 247 | next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it |
| 251 | does not add any characters; instead, @key{TAB} displays a list of all | 248 | does not add any characters; instead, @key{TAB} displays a list of all |
| 252 | possible completions in another window. | 249 | possible completions in another window. |
| 253 | 250 | ||
| 254 | Next, type @kbd{- f}. The minibuffer now contains @samp{auto-f}, | 251 | Next, type @kbd{-f}. The minibuffer now contains @samp{auto-f}, and |
| 255 | and the only command name that starts with this is | 252 | the only command name that starts with this is @code{auto-fill-mode}. |
| 256 | @code{auto-fill-mode}. If you now type @key{TAB}, completion fills in | 253 | If you now type @key{TAB}, completion fills in the rest of the |
| 257 | the rest of the argument @samp{auto-fill-mode} into the minibuffer. | 254 | argument @samp{auto-fill-mode} into the minibuffer. |
| 258 | You have been able to enter @samp{auto-fill-mode} by typing just | 255 | |
| 259 | @kbd{a u @key{TAB} - f @key{TAB}}. | 256 | Hence, typing just @kbd{a u @key{TAB} - f @key{TAB}} allows you to |
| 257 | enter @samp{auto-fill-mode}. | ||
| 260 | 258 | ||
| 261 | @node Completion Commands | 259 | @node Completion Commands |
| 262 | @subsection Completion Commands | 260 | @subsection Completion Commands |
| @@ -272,60 +270,24 @@ complete, display a list of possible completions | |||
| 272 | (@code{minibuffer-complete}). | 270 | (@code{minibuffer-complete}). |
| 273 | @item @key{SPC} | 271 | @item @key{SPC} |
| 274 | Complete up to one word from the minibuffer text before point | 272 | Complete up to one word from the minibuffer text before point |
| 275 | (@code{minibuffer-complete-word}). @key{SPC} for completion is not | 273 | (@code{minibuffer-complete-word}). This command is not available for |
| 276 | available when entering a file name, since file names often include | 274 | arguments that often include spaces, such as file names. |
| 277 | spaces. | ||
| 278 | @item @key{RET} | 275 | @item @key{RET} |
| 279 | Submit the text in the minibuffer as the argument, possibly completing | 276 | Submit the text in the minibuffer as the argument, possibly completing |
| 280 | first as described in the next | 277 | first (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}. |
| 281 | @iftex | ||
| 282 | subsection (@code{minibuffer-complete-and-exit}). | ||
| 283 | @end iftex | ||
| 284 | @ifnottex | ||
| 285 | node (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}. | ||
| 286 | @end ifnottex | ||
| 287 | @item ? | 278 | @item ? |
| 288 | Display a list of possible completions of the text before point | 279 | Display a list of completions (@code{minibuffer-completion-help}). |
| 289 | (@code{minibuffer-completion-help}). | ||
| 290 | @end table | 280 | @end table |
| 291 | 281 | ||
| 292 | @kindex TAB | 282 | @kindex TAB @r{(completion)} |
| 293 | @findex minibuffer-complete | 283 | @findex minibuffer-complete |
| 294 | @key{TAB} (@code{minibuffer-complete}) is the most fundamental | 284 | @key{TAB} (@code{minibuffer-complete}) is the most fundamental |
| 295 | completion command. It searches for all possible completion | 285 | completion command. It searches for all possible completions that |
| 296 | alternatives that match the existing minibuffer text, and attempts to | 286 | match the existing minibuffer text, and attempts to complete as much |
| 297 | complete as much as it can. The matching of completion alternatives | 287 | as it can. @xref{Completion Styles}, for how completion alternatives |
| 298 | to the minibuffer text is performed according to somewhat intricate | 288 | are chosen. |
| 299 | rules, which are designed so that plausible completions are offered | ||
| 300 | under most circumstances. A valid completion alternative must satisfy | ||
| 301 | the following criteria: | ||
| 302 | 289 | ||
| 303 | @itemize @bullet | 290 | @kindex SPC @r{(completion)} |
| 304 | @item | ||
| 305 | The minibuffer text before point must be the same as the beginning of | ||
| 306 | the completion alternative. If there is any minibuffer text after | ||
| 307 | point, it must be a substring of the remainder of the completion | ||
| 308 | alternative. | ||
| 309 | |||
| 310 | @item | ||
| 311 | If no completion alternative satisfies the above rules, try using | ||
| 312 | @dfn{partial completion} rules: divide the minibuffer text into words | ||
| 313 | separated by hyphens or spaces, and complete each word separately. | ||
| 314 | Thus, when completing command names, @samp{em-l-m} completes to | ||
| 315 | @samp{emacs-lisp-mode}. | ||
| 316 | |||
| 317 | @item | ||
| 318 | If there is still no completion alternative, try the first rule again, | ||
| 319 | but ignore the minibuffer text after point (i.e., don't try matching | ||
| 320 | it). | ||
| 321 | @end itemize | ||
| 322 | |||
| 323 | @noindent | ||
| 324 | When performing these comparisons, a @samp{*} in the minibuffer text | ||
| 325 | acts as a @dfn{wildcard}---it matches any character at the | ||
| 326 | corresponding position in the completion alternative. | ||
| 327 | |||
| 328 | @kindex SPC | ||
| 329 | @findex minibuffer-complete-word | 291 | @findex minibuffer-complete-word |
| 330 | @key{SPC} (@code{minibuffer-complete-word}) completes like | 292 | @key{SPC} (@code{minibuffer-complete-word}) completes like |
| 331 | @key{TAB}, but only up to the next hyphen or space. If you have | 293 | @key{TAB}, but only up to the next hyphen or space. If you have |
| @@ -334,50 +296,52 @@ completion is @samp{auto-fill-mode}, but it only inserts @samp{ill-}, | |||
| 334 | giving @samp{auto-fill-}. Another @key{SPC} at this point completes | 296 | giving @samp{auto-fill-}. Another @key{SPC} at this point completes |
| 335 | all the way to @samp{auto-fill-mode}. | 297 | all the way to @samp{auto-fill-mode}. |
| 336 | 298 | ||
| 299 | @kindex ? @r{(completion)} | ||
| 300 | @cindex completion list | ||
| 337 | If @key{TAB} or @key{SPC} is unable to complete, it displays a list | 301 | If @key{TAB} or @key{SPC} is unable to complete, it displays a list |
| 338 | of possible completions (if there are any) in a separate window. You | 302 | of matching completion alternatives (if there are any) in another |
| 339 | can choose a completion from this list using the following commands: | 303 | window. You can display the same list with @kbd{?} |
| 304 | (@code{minibuffer-completion-help}). The following commands can be | ||
| 305 | used with the completion list: | ||
| 340 | 306 | ||
| 341 | @table @kbd | 307 | @table @kbd |
| 342 | @findex mouse-choose-completion | 308 | @findex mouse-choose-completion |
| 343 | @item Mouse-1 | 309 | @item Mouse-1 |
| 344 | @itemx Mouse-2 | 310 | @itemx Mouse-2 |
| 345 | Clicking mouse button 1 or 2 on a completion possibility chooses that | 311 | Clicking mouse button 1 or 2 on a completion alternative chooses it |
| 346 | completion (@code{mouse-choose-completion}). | 312 | (@code{mouse-choose-completion}). |
| 347 | 313 | ||
| 348 | @findex switch-to-completions | 314 | @findex switch-to-completions |
| 349 | @item M-v | 315 | @item M-v |
| 350 | @itemx @key{PageUp} | 316 | @itemx @key{PageUp} |
| 351 | @itemx @key{prior} | 317 | @itemx @key{prior} |
| 352 | Typing @kbd{M-v}, while in the minibuffer, selects the window showing | 318 | Typing @kbd{M-v}, while in the minibuffer, selects the window showing |
| 353 | the completion list buffer (@code{switch-to-completions}). This paves | 319 | the completion list (@code{switch-to-completions}). This paves the |
| 354 | the way for using the commands below. Typing @key{PageUp} or | 320 | way for using the commands below. @key{PageUp} or @key{prior} does |
| 355 | @key{prior} does the same, as does selecting that window in other | 321 | the same. You can also select the window in other ways |
| 356 | ways. | 322 | (@pxref{Windows}). |
| 357 | 323 | ||
| 358 | @findex choose-completion | 324 | @findex choose-completion |
| 359 | @item @key{RET} | 325 | @item @key{RET} |
| 360 | Typing @key{RET}, while in the completion list buffer, chooses the | 326 | While in the completion list buffer, this chooses the completion at |
| 361 | completion that point is in or next to (@code{choose-completion}). To | 327 | point (@code{choose-completion}). |
| 362 | use this command, you must first switch to the completion list window. | ||
| 363 | 328 | ||
| 364 | @findex next-completion | 329 | @findex next-completion |
| 365 | @item @key{Right} | 330 | @item @key{Right} |
| 366 | Typing the right-arrow key @key{Right}, while in the completion list | 331 | While in the completion list buffer, this moves point to the following |
| 367 | buffer, moves point to the following completion possibility | 332 | completion alternative (@code{next-completion}). |
| 368 | (@code{next-completion}). | ||
| 369 | 333 | ||
| 370 | @findex previous-completion | 334 | @findex previous-completion |
| 371 | @item @key{Left} | 335 | @item @key{Left} |
| 372 | Typing the left-arrow key @key{Left}, while in the completion list | 336 | While in the completion list buffer, this moves point to the previous |
| 373 | buffer, moves point to the previous completion possibility | 337 | completion alternative (@code{previous-completion}). |
| 374 | (@code{previous-completion}). | ||
| 375 | @end table | 338 | @end table |
| 376 | 339 | ||
| 377 | @node Strict Completion | 340 | @node Strict Completion |
| 378 | @subsection Strict Completion | 341 | @subsection Strict Completion |
| 379 | 342 | ||
| 380 | There are three different ways that @key{RET} can do completion, | 343 | There are three ways that the @key{RET} |
| 344 | (@code{minibuffer-complete-and-exit}) completion command can act, | ||
| 381 | depending on how the argument will be used. | 345 | depending on how the argument will be used. |
| 382 | 346 | ||
| 383 | @itemize @bullet | 347 | @itemize @bullet |
| @@ -406,67 +370,140 @@ completion, @key{RET} does not complete, it just submits the argument | |||
| 406 | as you have entered it. | 370 | as you have entered it. |
| 407 | @end itemize | 371 | @end itemize |
| 408 | 372 | ||
| 409 | The completion commands display a list of all possible completions | 373 | Like the other completion commands, @key{RET} displays a list of all |
| 410 | whenever they can't determine even one more character by completion. | 374 | possible completions whenever it is supposed to complete but is unable |
| 411 | Also, typing @kbd{?} explicitly requests such a list. You can scroll | 375 | to complete any further. |
| 412 | the list with @kbd{C-M-v} (@pxref{Other Window}). | ||
| 413 | 376 | ||
| 414 | @node Completion Options | 377 | @node Completion Styles |
| 415 | @subsection Completion Options | 378 | @subsection How Completion Alternatives Are Chosen |
| 379 | @cindex completion style | ||
| 416 | 380 | ||
| 417 | @vindex completion-auto-help | 381 | Completion commands work by narrowing a large list of possible |
| 418 | If @code{completion-auto-help} is set to @code{nil}, the completion | 382 | completion alternatives to a smaller subset that ``matches'' what you |
| 419 | commands never display the completion list buffer; you must type | 383 | have typed in the minibuffer. In @ref{Completion Example}, we gave a |
| 420 | @kbd{?} to display the list. If the value is @code{lazy}, Emacs only | 384 | simple example of such matching. The procedure of determining what |
| 421 | shows the completion list buffer on the second attempt to complete. | 385 | constitutes a ``match'' is quite intricate. Emacs attempts to offer |
| 422 | In other words, if there is nothing to complete, the first @key{TAB} | 386 | plausible completions under most circumstances. |
| 423 | echoes @samp{Next char not unique}; the second @key{TAB} does the | ||
| 424 | completion list buffer. | ||
| 425 | 387 | ||
| 426 | @vindex completion-ignored-extensions | 388 | Emacs performs completion using one or more @dfn{completion |
| 427 | @cindex ignored file names, in completion | 389 | styles}---sets of criteria for matching minibuffer text to completion |
| 428 | When completing file names, certain file names are usually ignored. | 390 | alternatives. During completion, Emacs tries each completion style in |
| 429 | The variable @code{completion-ignored-extensions} contains a list of | 391 | turn. If a style yields one or more matches, that is used as the list |
| 430 | strings; a file name ending in any of those strings is ignored as a | 392 | of completion alternatives. If a style produces no matches, Emacs |
| 431 | completion candidate. The standard value of this variable has several | 393 | falls back on the next style. |
| 432 | elements including @code{".o"}, @code{".elc"}, and @code{"~"}. For | ||
| 433 | example, if a directory contains @samp{foo.c} and @samp{foo.elc}, | ||
| 434 | @samp{foo} completes to @samp{foo.c}. However, if @emph{all} possible | ||
| 435 | completions end in ``ignored'' strings, they are not ignored: in the | ||
| 436 | previous example, @samp{foo.e} completes to @samp{foo.elc}. | ||
| 437 | Displaying a list of possible completions disregards | ||
| 438 | @code{completion-ignored-extensions}; it shows them all. | ||
| 439 | 394 | ||
| 440 | If an element of @code{completion-ignored-extensions} ends in a | 395 | @vindex completion-styles |
| 441 | slash (@file{/}), it's a subdirectory name; that directory and its | 396 | The list variable @code{completion-styles} specifies the completion |
| 442 | contents are ignored. Elements of | 397 | styles to use. Each list element is the name of a completion style (a |
| 443 | @code{completion-ignored-extensions} that do not end in a slash are | 398 | Lisp symbol). The default completion styles are (in order): |
| 444 | ordinary file names. | 399 | |
| 400 | @table @code | ||
| 401 | @item basic | ||
| 402 | A matching completion alternative must have the same beginning as the | ||
| 403 | text in the minibuffer before point. Furthermore, if there is any | ||
| 404 | text in the minibuffer after point, the rest of the completion | ||
| 405 | alternative must contain that text as a substring. | ||
| 406 | |||
| 407 | @findex partial completion | ||
| 408 | @item partial-completion | ||
| 409 | This aggressive completion style divides the minibuffer text into | ||
| 410 | words separated by hyphens or spaces, and completes each word | ||
| 411 | separately. (For example, when completing command names, | ||
| 412 | @samp{em-l-m} completes to @samp{emacs-lisp-mode}.) | ||
| 413 | |||
| 414 | Furthermore, a @samp{*} in the minibuffer text is treated as a | ||
| 415 | @dfn{wildcard}---it matches any character at the corresponding | ||
| 416 | position in the completion alternative. | ||
| 417 | |||
| 418 | @item emacs22 | ||
| 419 | This completion style is similar to @code{basic}, except that it | ||
| 420 | ignores the text in the minibuffer after point. It is so-named | ||
| 421 | because it corresponds to the completion behavior in Emacs 22 and | ||
| 422 | earlier. | ||
| 423 | @end table | ||
| 424 | |||
| 425 | @noindent | ||
| 426 | The following additional completion styles are also defined, and you | ||
| 427 | can add them to @code{completion-styles} if you wish | ||
| 428 | (@pxref{Customization}): | ||
| 429 | |||
| 430 | @table @code | ||
| 431 | @item substring | ||
| 432 | A matching completion alternative must contain the text in the | ||
| 433 | minibuffer before point, and the text in the minibuffer after point, | ||
| 434 | as substrings (in that same order). | ||
| 435 | |||
| 436 | Thus, if the text in the minibuffer is @samp{foobar}, with point | ||
| 437 | between @samp{foo} and @samp{bar}, that matches | ||
| 438 | @samp{@var{a}foo@var{b}bar@var{c}}, where @var{a}, @var{b}, and | ||
| 439 | @var{c} can be any string including the empty string. | ||
| 440 | |||
| 441 | @item initials | ||
| 442 | This very aggressive completion style attempts to complete acronyms | ||
| 443 | and initialisms. For example, when completing command names, it | ||
| 444 | matches @samp{lch} to @samp{list-command-history}. | ||
| 445 | @end table | ||
| 446 | |||
| 447 | @node Completion Options | ||
| 448 | @subsection Completion Options | ||
| 445 | 449 | ||
| 446 | @cindex case-sensitivity and completion | 450 | @cindex case-sensitivity and completion |
| 451 | @cindex case in completion | ||
| 452 | Case is significant when completing case-sensitive arguments, such | ||
| 453 | as command names. For example, when completing command names, | ||
| 454 | @samp{AU} does not complete to @samp{auto-fill-mode}. Case | ||
| 455 | differences are ignored when completing arguments in which case does | ||
| 456 | not matter. | ||
| 457 | |||
| 447 | @vindex read-file-name-completion-ignore-case | 458 | @vindex read-file-name-completion-ignore-case |
| 448 | @vindex read-buffer-completion-ignore-case | 459 | @vindex read-buffer-completion-ignore-case |
| 449 | When completing file names, Emacs ignores case differences if the | 460 | When completing file names, case differences are ignored if the |
| 450 | variable @code{read-file-name-completion-ignore-case} is | 461 | variable @code{read-file-name-completion-ignore-case} is |
| 451 | non-@code{nil}. The default value is @code{nil} on systems that have | 462 | non-@code{nil}. The default value is @code{nil} on systems that have |
| 452 | case-sensitive file-names, such as GNU/Linux; it is non-@code{nil} on | 463 | case-sensitive file-names, such as GNU/Linux; it is non-@code{nil} on |
| 453 | systems that have case-insensitive file-names, such as Microsoft | 464 | systems that have case-insensitive file-names, such as Microsoft |
| 454 | Windows. When completing buffer names, Emacs ignores case differences | 465 | Windows. When completing buffer names, case differences are ignored |
| 455 | if @code{read-buffer-completion-ignore-case} is non-@code{nil} (the | 466 | if the variable @code{read-buffer-completion-ignore-case} is |
| 456 | default value is @code{nil}). | 467 | non-@code{nil}; the default is @code{nil}. |
| 457 | 468 | ||
| 458 | @vindex completion-styles | 469 | @vindex completion-ignored-extensions |
| 459 | You can customize the matching rules for completion alternatives | 470 | @cindex ignored file names, in completion |
| 460 | using the variable @code{completion-styles}. Its value should be a | 471 | When completing file names, Emacs usually omits certain alternatives |
| 461 | list of symbols, each representing a @dfn{completion style}; valid | 472 | that are considered unlikely to be chosen, as determined by the list |
| 462 | style symbols are @code{basic}, @code{partial-completion}, | 473 | variable @code{completion-ignored-extensions}. Each element in the |
| 463 | @code{emacs22}, @code{emacs21}, and @code{initials}. When completing, | 474 | list should be a string; any file name ending in such a string is |
| 464 | Emacs attempts to use the first completion style in the list; if this | 475 | ignored as a completion alternative. Any element ending in a slash |
| 465 | does not return any completion alternatives, it tries the next | 476 | (@file{/}) represents a subdirectory name. The standard value of |
| 466 | completion style in the list, and so on. The completion rules | 477 | @code{completion-ignored-extensions} has several elements including |
| 467 | described in @ref{Completion Commands} correspond to the default value | 478 | @code{".o"}, @code{".elc"}, and @code{"~"}. For example, if a |
| 468 | of @code{completion-styles}, which is @code{(basic partial-completion | 479 | directory contains @samp{foo.c} and @samp{foo.elc}, @samp{foo} |
| 469 | emacs22)}. | 480 | completes to @samp{foo.c}. However, if @emph{all} possible |
| 481 | completions end in ``ignored'' strings, they are not ignored: in the | ||
| 482 | previous example, @samp{foo.e} completes to @samp{foo.elc}. Emacs | ||
| 483 | disregards @code{completion-ignored-extensions} when showing | ||
| 484 | completion alternatives in the completion list. | ||
| 485 | |||
| 486 | @vindex completion-auto-help | ||
| 487 | If @code{completion-auto-help} is set to @code{nil}, the completion | ||
| 488 | commands never display the completion list buffer; you must type | ||
| 489 | @kbd{?} to display the list. If the value is @code{lazy}, Emacs only | ||
| 490 | shows the completion list buffer on the second attempt to complete. | ||
| 491 | In other words, if there is nothing to complete, the first @key{TAB} | ||
| 492 | echoes @samp{Next char not unique}; the second @key{TAB} does the | ||
| 493 | completion list buffer. | ||
| 494 | |||
| 495 | @vindex completion-cycle-threshold | ||
| 496 | If @code{completion-cycle-threshold} is non-@code{nil}, completion | ||
| 497 | commands can ``cycle'' through completion alternatives. Normally, if | ||
| 498 | there is more than one completion alternative for the text in the | ||
| 499 | minibuffer, a completion command completes up to the longest common | ||
| 500 | substring. If you change @code{completion-cycle-threshold} to | ||
| 501 | @code{t}, the completion command instead completes to the first of | ||
| 502 | those completion alternatives; each subsequent invocation of the | ||
| 503 | completion command replaces that with the next completion alternative, | ||
| 504 | in a cyclic manner. If you give @code{completion-cycle-threshold} a | ||
| 505 | numeric value @var{n}, completion commands switch to this cycling | ||
| 506 | behavior only when there are fewer than @var{n} alternatives. | ||
| 470 | 507 | ||
| 471 | @cindex Icomplete mode | 508 | @cindex Icomplete mode |
| 472 | @findex icomplete-mode | 509 | @findex icomplete-mode |
| @@ -504,64 +541,60 @@ Move to a later item in the minibuffer history that matches | |||
| 504 | 541 | ||
| 505 | @kindex M-p @r{(minibuffer history)} | 542 | @kindex M-p @r{(minibuffer history)} |
| 506 | @kindex M-n @r{(minibuffer history)} | 543 | @kindex M-n @r{(minibuffer history)} |
| 544 | @kindex UP @r{(minibuffer history)} | ||
| 545 | @kindex DOWN @r{(minibuffer history)} | ||
| 507 | @findex next-history-element | 546 | @findex next-history-element |
| 508 | @findex previous-history-element | 547 | @findex previous-history-element |
| 509 | While in the minibuffer, typing @kbd{M-p} or @key{Up} | 548 | While in the minibuffer, @kbd{M-p} or @key{Up} |
| 510 | (@code{previous-history-element}) moves up through the minibuffer | 549 | (@code{previous-history-element}) moves through the minibuffer history |
| 511 | history list, one item at a time. Each @kbd{M-p} fetches an earlier | 550 | list, one item at a time. Each @kbd{M-p} fetches an earlier item from |
| 512 | item from the history list into the minibuffer, replacing its existing | 551 | the history list into the minibuffer, replacing its existing contents. |
| 513 | contents. Similarly, typing @kbd{M-n} or @key{Down} | 552 | Typing @kbd{M-n} or @key{Down} (@code{next-history-element}) moves |
| 514 | (@code{next-history-element}) moves back down the history list, | 553 | through the minibuffer history list in the opposite direction, |
| 515 | fetching later entries into the minibuffer. You can think of these | 554 | fetching later entries into the minibuffer. |
| 516 | commands as ``backwards'' and ``forwards'' through the history list. | ||
| 517 | 555 | ||
| 518 | If you type @kbd{M-n} in the minibuffer when there are no later | 556 | If you type @kbd{M-n} in the minibuffer when there are no later |
| 519 | entries in the minibuffer history (e.g., if you haven't previously | 557 | entries in the minibuffer history (e.g., if you haven't previously |
| 520 | typed @kbd{M-p}), Emacs tries fetching from a list of default | 558 | typed @kbd{M-p}), Emacs tries fetching from a list of default |
| 521 | argument: values that you are likely to enter. You can think of this | 559 | arguments: values that you are likely to enter. You can think of this |
| 522 | as moving through the ``future list'' instead of the ``history list''. | 560 | as moving through the ``future history'' list. |
| 523 | 561 | ||
| 524 | The input that @kbd{M-p} or @kbd{M-n} fetches into the minibuffer | 562 | If you edit the text inserted by the @kbd{M-p} or @key{M-n} |
| 525 | entirely replaces the existing contents of the minibuffer, so you can | 563 | minibuffer history commands, this does not change its entry in the |
| 526 | simply type @key{RET} to use it as an argument. You can also edit the | 564 | history list. However, the edited argument does go at the end of the |
| 527 | text before you reuse it; this does not change the history element | 565 | history list when you submit it. |
| 528 | that you ``moved'' to, but your new argument does go at the end of the | ||
| 529 | history list in its own right. | ||
| 530 | 566 | ||
| 531 | @findex previous-matching-history-element | 567 | @findex previous-matching-history-element |
| 532 | @findex next-matching-history-element | 568 | @findex next-matching-history-element |
| 533 | @kindex M-r @r{(minibuffer history)} | 569 | @kindex M-r @r{(minibuffer history)} |
| 534 | @kindex M-s @r{(minibuffer history)} | 570 | @kindex M-s @r{(minibuffer history)} |
| 535 | There are also commands to search forward or backward through the | 571 | You can use @kbd{M-r} (@code{previous-matching-history-element}) to |
| 536 | history; they search for history elements that match a regular | 572 | search through older elements in the history list, and @kbd{M-s} |
| 537 | expression. @kbd{M-r} (@code{previous-matching-history-element}) | 573 | (@code{next-matching-history-element}) to search through newer |
| 538 | searches older elements in the history, while @kbd{M-s} | 574 | entries. Each of these commands asks for a @dfn{regular expression} |
| 539 | (@code{next-matching-history-element}) searches newer elements. These | 575 | as an argument, and fetches the first matching entry into the |
| 540 | commands are unusual: they use the minibuffer to read the regular | 576 | minibuffer. @xref{Regexps}, for an explanation of regular |
| 541 | expression even though they are invoked from the minibuffer. As with | 577 | expressions. A numeric prefix argument @var{n} means to fetch the |
| 542 | incremental searching, an upper-case letter in the regular expression | 578 | @var{n}th matching entry. These commands are unusual, in that they |
| 543 | makes the search case-sensitive (@pxref{Search Case}). You can also | 579 | use the minibuffer to read the regular expression argument, even |
| 544 | search through the history using an incremental search (@pxref{Isearch | 580 | though they are invoked from the minibuffer. An upper-case letter in |
| 545 | Minibuffer}). | 581 | the regular expression makes the search case-sensitive (@pxref{Search |
| 546 | 582 | Case}). | |
| 547 | All uses of the minibuffer record your input on a history list, but | 583 | |
| 548 | there are separate history lists for different kinds of arguments. | 584 | You can also search through the history using an incremental search. |
| 549 | For example, there is a list for file names, used by all the commands | 585 | @xref{Isearch Minibuffer}. |
| 550 | that read file names. (As a special feature, this history list | 586 | |
| 551 | records the absolute file name, even if the name you entered was not | 587 | Emacs keeps separate history lists for several different kinds of |
| 552 | absolute.) | 588 | arguments. For example, there is a list for file names, used by all |
| 553 | 589 | the commands that read file names. Other history lists include buffer | |
| 554 | There are several other specific history lists, including one for | 590 | names, command names (used by @kbd{M-x}), and command arguments (used |
| 555 | buffer names, one for arguments of commands like @code{query-replace}, | 591 | by commands like @code{query-replace}). |
| 556 | one used by @kbd{M-x} for command names, and one used by | ||
| 557 | @code{compile} for compilation commands. Finally, there is one | ||
| 558 | ``miscellaneous'' history list that most minibuffer arguments use. | ||
| 559 | 592 | ||
| 560 | @vindex history-length | 593 | @vindex history-length |
| 561 | The variable @code{history-length} specifies the maximum length of a | 594 | The variable @code{history-length} specifies the maximum length of a |
| 562 | minibuffer history list; adding a new element deletes the oldest | 595 | minibuffer history list; adding a new element deletes the oldest |
| 563 | element if the list gets too long. If the value of | 596 | element if the list gets too long. If the value is @code{t}, there is |
| 564 | @code{history-length} is @code{t}, there is no maximum length. | 597 | no maximum length. |
| 565 | 598 | ||
| 566 | @vindex history-delete-duplicates | 599 | @vindex history-delete-duplicates |
| 567 | The variable @code{history-delete-duplicates} specifies whether to | 600 | The variable @code{history-delete-duplicates} specifies whether to |
| @@ -592,27 +625,25 @@ Display the entire command history, showing all the commands | |||
| 592 | 625 | ||
| 593 | @kindex C-x ESC ESC | 626 | @kindex C-x ESC ESC |
| 594 | @findex repeat-complex-command | 627 | @findex repeat-complex-command |
| 595 | @kbd{C-x @key{ESC} @key{ESC}} is used to re-execute a recent command | 628 | @kbd{C-x @key{ESC} @key{ESC}} re-executes a recent command that used |
| 596 | that used the minibuffer. With no argument, it repeats the last such | 629 | the minibuffer. With no argument, it repeats the last such command. |
| 597 | command. A numeric argument specifies which command to repeat; 1 | 630 | A numeric argument specifies which command to repeat; 1 means the last |
| 598 | means the last one, 2 the previous, and so on. | 631 | one, 2 the previous, and so on. |
| 599 | 632 | ||
| 600 | @kbd{C-x @key{ESC} @key{ESC}} works by turning the previous command | 633 | @kbd{C-x @key{ESC} @key{ESC}} works by turning the previous command |
| 601 | into a Lisp expression and then entering a minibuffer initialized with | 634 | into a Lisp expression and then entering a minibuffer initialized with |
| 602 | the text for that expression. Even if you don't understand Lisp | 635 | the text for that expression. Even if you don't know Lisp, it will |
| 603 | syntax, it will probably be obvious which command is displayed for | 636 | probably be obvious which command is displayed for repetition. If you |
| 604 | repetition. If you type just @key{RET}, that repeats the command | 637 | type just @key{RET}, that repeats the command unchanged. You can also |
| 605 | unchanged. You can also change the command by editing the Lisp | 638 | change the command by editing the Lisp expression before you execute |
| 606 | expression before you execute it. The repeated command is added to | 639 | it. The repeated command is added to the front of the command history |
| 607 | the front of the command history unless it is identical to the most | 640 | unless it is identical to the most recent item. |
| 608 | recent item. | 641 | |
| 609 | 642 | Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you | |
| 610 | Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you can | 643 | can use the usual minibuffer history commands (@pxref{Minibuffer |
| 611 | use the minibuffer history commands (@kbd{M-p}, @kbd{M-n}, @kbd{M-r}, | 644 | History}) to move through the history list. After finding the desired |
| 612 | @kbd{M-s}; @pxref{Minibuffer History}) to move through the history list | 645 | previous command, you can edit its expression as usual and then repeat |
| 613 | of saved entire commands. After finding the desired previous command, | 646 | it by typing @key{RET}. |
| 614 | you can edit its expression as usual and then repeat it by typing | ||
| 615 | @key{RET}. | ||
| 616 | 647 | ||
| 617 | @vindex isearch-resume-in-command-history | 648 | @vindex isearch-resume-in-command-history |
| 618 | Incremental search does not, strictly speaking, use the minibuffer. | 649 | Incremental search does not, strictly speaking, use the minibuffer. |
| @@ -637,12 +668,11 @@ when you tell Emacs to visit a file on another machine via a network | |||
| 637 | protocol such as FTP, you often need to supply a password to gain | 668 | protocol such as FTP, you often need to supply a password to gain |
| 638 | access to the machine (@pxref{Remote Files}). | 669 | access to the machine (@pxref{Remote Files}). |
| 639 | 670 | ||
| 640 | Entering a password is, in a basic sense, similar to using a | 671 | Entering a password is similar to using a minibuffer. Emacs |
| 641 | minibuffer. Emacs displays a prompt in the echo area (such as | 672 | displays a prompt in the echo area (such as @samp{Password: }); after |
| 642 | @samp{Password: }); after you type the required password, press | 673 | you type the required password, press @key{RET} to submit it. To |
| 643 | @key{RET} to submit it. To prevent others from seeing your password, | 674 | prevent others from seeing your password, every character you type is |
| 644 | every character you type is displayed as a dot (@samp{.}) instead of | 675 | displayed as a dot (@samp{.}) instead of its usual form. |
| 645 | its usual form. | ||
| 646 | 676 | ||
| 647 | Most of the features and commands associated with the minibuffer can | 677 | Most of the features and commands associated with the minibuffer can |
| 648 | @emph{not} be used when entering a password. There is no history or | 678 | @emph{not} be used when entering a password. There is no history or |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 598f495784f..d7639b3b665 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -1531,8 +1531,8 @@ Specify a command to run if @code{emacsclient} fails to contact Emacs. | |||
| 1531 | This is useful when running @code{emacsclient} in a script. | 1531 | This is useful when running @code{emacsclient} in a script. |
| 1532 | 1532 | ||
| 1533 | As a special exception, if @var{command} is the empty string, then | 1533 | As a special exception, if @var{command} is the empty string, then |
| 1534 | @code{emacsclient} starts Emacs in daemon mode and then tries | 1534 | @code{emacsclient} starts Emacs in daemon mode (as @command{emacs |
| 1535 | connecting again. | 1535 | --daemon}) and then tries connecting again. |
| 1536 | 1536 | ||
| 1537 | @cindex @env{ALTERNATE_EDITOR} environment variable | 1537 | @cindex @env{ALTERNATE_EDITOR} environment variable |
| 1538 | The environment variable @env{ALTERNATE_EDITOR} has the same effect as | 1538 | The environment variable @env{ALTERNATE_EDITOR} has the same effect as |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 4f1683ef5ea..29b6c69e38f 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -1707,10 +1707,9 @@ directionality when they are displayed. The default value is | |||
| 1707 | 1707 | ||
| 1708 | Each paragraph of bidirectional text can have its own @dfn{base | 1708 | Each paragraph of bidirectional text can have its own @dfn{base |
| 1709 | direction}, either right-to-left or left-to-right. (Paragraph | 1709 | direction}, either right-to-left or left-to-right. (Paragraph |
| 1710 | boundaries are defined by the regular expressions | 1710 | boundaries are empty lines, i.e.@: lines consisting entirely of |
| 1711 | @code{paragraph-start} and @code{paragraph-separate}, see | 1711 | whitespace characters.) Text in left-to-right paragraphs begins at |
| 1712 | @ref{Paragraphs}.) Text in left-to-right paragraphs begins at the | 1712 | the left margin of the window and is truncated or continued when it |
| 1713 | left margin of the window and is truncated or continued when it | ||
| 1714 | reaches the right margin. By contrast, text in right-to-left | 1713 | reaches the right margin. By contrast, text in right-to-left |
| 1715 | paragraphs begins at the right margin and is continued or truncated at | 1714 | paragraphs begins at the right margin and is continued or truncated at |
| 1716 | the left margin. | 1715 | the left margin. |
| @@ -1734,8 +1733,8 @@ The special character @code{RIGHT-TO-LEFT MARK}, or @sc{rlm}, forces | |||
| 1734 | the right-to-left direction on the following paragraph, while | 1733 | the right-to-left direction on the following paragraph, while |
| 1735 | @code{LEFT-TO-RIGHT MARK}, or @sc{lrm} forces the left-to-right | 1734 | @code{LEFT-TO-RIGHT MARK}, or @sc{lrm} forces the left-to-right |
| 1736 | direction. (You can use @kbd{C-x 8 RET} to insert these characters.) | 1735 | direction. (You can use @kbd{C-x 8 RET} to insert these characters.) |
| 1737 | In a GUI session, the @sc{lrm} and @sc{rlm} characters display as | 1736 | In a GUI session, the @sc{lrm} and @sc{rlm} characters display as very |
| 1738 | blanks. | 1737 | thin blank characters; on text terminals they display as blanks. |
| 1739 | 1738 | ||
| 1740 | Because characters are reordered for display, Emacs commands that | 1739 | Because characters are reordered for display, Emacs commands that |
| 1741 | operate in the logical order or on stretches of buffer positions may | 1740 | operate in the logical order or on stretches of buffer positions may |
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 59f65fac8af..14d4c678085 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi | |||
| @@ -5,31 +5,35 @@ | |||
| 5 | @node Screen, User Input, Acknowledgments, Top | 5 | @node Screen, User Input, Acknowledgments, Top |
| 6 | @chapter The Organization of the Screen | 6 | @chapter The Organization of the Screen |
| 7 | @cindex screen | 7 | @cindex screen |
| 8 | @cindex parts of the screen | 8 | @cindex frame |
| 9 | 9 | ||
| 10 | On a text-only terminal, the Emacs display occupies the entire | 10 | On a graphical display, such as on GNU/Linux using the X Window |
| 11 | terminal screen. On a graphical display, such as on GNU/Linux using | 11 | System, Emacs occupies a ``graphical window''. On a text-only |
| 12 | the X Window System, Emacs creates its own windows to use. We use the | 12 | terminal, Emacs occupies the entire terminal screen. We will use the |
| 13 | term @dfn{frame} to mean the entire terminal screen or graphical | 13 | term @dfn{frame} to mean a graphical window or terminal screen |
| 14 | window used by Emacs. Emacs uses both kinds of frames, in the same | 14 | occupied by Emacs. Emacs behaves very similarly on both kinds of |
| 15 | way, to display your editing. Emacs normally starts out with just one | 15 | frames. It normally starts out with just one frame, but you can |
| 16 | frame, but you can create additional frames if you wish | 16 | create additional frames if you wish (@pxref{Frames}). |
| 17 | (@pxref{Frames}). | 17 | |
| 18 | 18 | Each frame consists of several distinct regions. At the top of the | |
| 19 | The frame consists of several distinct regions. At the top of the | ||
| 20 | frame is a @dfn{menu bar}, which allows you to access commands via a | 19 | frame is a @dfn{menu bar}, which allows you to access commands via a |
| 21 | series of menus. On a graphical display, directly below the menu bar | 20 | series of menus. On a graphical display, directly below the menu bar |
| 22 | is a @dfn{tool bar}, a row of icons that perform editing commands if | 21 | is a @dfn{tool bar}, a row of icons that perform editing commands if |
| 23 | you click on them. At the very bottom of the frame is a special | 22 | you click on them. At the very bottom of the frame is an @dfn{echo |
| 24 | @dfn{echo area}, where short informative messages are displayed and | 23 | area}, where informative messages are displayed and where you enter |
| 25 | where you enter information when Emacs asks for it. | 24 | information when Emacs asks for it. |
| 26 | 25 | ||
| 27 | The main area of the frame, below the tool bar (if one exists) and | 26 | The main area of the frame, below the tool bar (if one exists) and |
| 28 | above the echo area, is called @dfn{the window}. This is where Emacs | 27 | above the echo area, is called @dfn{the window}. Henceforth in this |
| 29 | displays the @dfn{buffer}: the text that you are editing. On a | 28 | manual, we will use the word ``window'' in this sense. Graphical |
| 30 | graphical display, the window possesses a @dfn{scroll bar} on one | 29 | display systems commonly use the word ``window'' with a different |
| 31 | side, which you can use to display different parts of the buffer in | 30 | meaning; but, as stated above, we refer to those ``graphical windows'' |
| 32 | the window. The last line of the window is a @dfn{mode line}. This | 31 | as ``frames''. |
| 32 | |||
| 33 | An Emacs window is where the @dfn{buffer}---the text you are | ||
| 34 | editing---is displayed. On a graphical display, the window possesses | ||
| 35 | a @dfn{scroll bar} on one side, which can be used to scroll through | ||
| 36 | the buffer. The last line of the window is a @dfn{mode line}. This | ||
| 33 | displays various information about what is going on in the buffer, | 37 | displays various information about what is going on in the buffer, |
| 34 | such as whether there are unsaved changes, the editing modes that are | 38 | such as whether there are unsaved changes, the editing modes that are |
| 35 | in use, the current line number, and so forth. | 39 | in use, the current line number, and so forth. |
| @@ -37,20 +41,18 @@ in use, the current line number, and so forth. | |||
| 37 | When you start Emacs, there is normally only one window in the | 41 | When you start Emacs, there is normally only one window in the |
| 38 | frame. However, you can subdivide this window horizontally or | 42 | frame. However, you can subdivide this window horizontally or |
| 39 | vertically to create multiple windows, each of which can independently | 43 | vertically to create multiple windows, each of which can independently |
| 40 | display a buffer (@pxref{Windows}). In this manual, the word | 44 | display a buffer (@pxref{Windows}). |
| 41 | ``window'' refers to the initial large window if not subdivided, or | 45 | |
| 42 | any one of the multiple windows you have subdivided it into. | 46 | At any time, one window is the @dfn{selected window}. On a |
| 43 | 47 | graphical display, the selected window shows a more prominent cursor | |
| 44 | At any time, one window is the @dfn{selected window}. On graphical | 48 | (usually solid and blinking); other windows show a less prominent |
| 45 | displays, the selected window normally shows a more prominent cursor | 49 | cursor (usually a hollow box). On a text terminal, there is only one |
| 46 | (usually solid and blinking) while other windows show a weaker cursor | 50 | cursor, which is shown in the selected window. The buffer displayed |
| 47 | (such as a hollow box). Text terminals have just one cursor, so it | 51 | in the selected window is called the @dfn{current buffer}, and it is |
| 48 | always appears in the selected window. The buffer displayed in the | 52 | where editing happens. Most Emacs commands implicitly apply to the |
| 49 | selected window is called the @dfn{current buffer}, and it is where | 53 | current buffer; the text displayed in unselected windows is mostly |
| 50 | editing happens. Most Emacs commands implicitly apply to the current | 54 | visible for reference. If you use multiple frames on a graphical |
| 51 | buffer; the text displayed in unselected windows is mostly visible for | 55 | display, selecting a particular frame selects a window in that frame. |
| 52 | reference. If you use multiple frames on a graphical display, | ||
| 53 | selecting a particular frame selects a window in that frame. | ||
| 54 | 56 | ||
| 55 | @menu | 57 | @menu |
| 56 | * Point:: The place in the text where editing commands operate. | 58 | * Point:: The place in the text where editing commands operate. |
| @@ -64,42 +66,33 @@ selecting a particular frame selects a window in that frame. | |||
| 64 | @cindex point | 66 | @cindex point |
| 65 | @cindex cursor | 67 | @cindex cursor |
| 66 | 68 | ||
| 67 | The active cursor shows the location at which editing commands will | 69 | The cursor in the selected window shows the location where most |
| 68 | take effect, which is called @dfn{point}@footnote{The term ``point'' | 70 | editing commands take effect, which is called @dfn{point}@footnote{The |
| 69 | comes from the character @samp{.}, which was the command in TECO (the | 71 | term ``point'' comes from the character @samp{.}, which was the |
| 70 | language in which the original Emacs was written) for accessing the | 72 | command in TECO (the language in which the original Emacs was written) |
| 71 | value now called ``point.''}. Many Emacs commands move point to | 73 | for accessing the editing position.}. Many Emacs commands move point |
| 72 | different places in the buffer; for example, you can place point by | 74 | to different places in the buffer; for example, you can place point by |
| 73 | clicking mouse button 1 (normally the left button) at the desired | 75 | clicking mouse button 1 (normally the left button) at the desired |
| 74 | location. | 76 | location. |
| 75 | 77 | ||
| 76 | If you use a block cursor, the cursor appears to be @emph{on} a | 78 | By default, the cursor in the selected window is drawn as a solid |
| 77 | character, but you should think of point as @emph{between} two | 79 | block and appears to be @emph{on} a character, but you should think of |
| 78 | characters; it points @emph{before} the character that appears under | 80 | point as @emph{between} two characters; it is situated @emph{before} |
| 79 | the cursor. For example, if your text looks like @samp{frob} with the | 81 | the character under the cursor. For example, if your text looks like |
| 80 | cursor over the @samp{b}, then point is between the @samp{o} and the | 82 | @samp{frob} with the cursor over the @samp{b}, then point is between |
| 81 | @samp{b}. If you insert the character @samp{!} at that position, the | 83 | the @samp{o} and the @samp{b}. If you insert the character @samp{!} |
| 82 | result is @samp{fro!b}, with point between the @samp{!} and the | 84 | at that position, the result is @samp{fro!b}, with point between the |
| 83 | @samp{b}. Thus, the cursor remains over the @samp{b}, as before. | 85 | @samp{!} and the @samp{b}. Thus, the cursor remains over the |
| 84 | 86 | @samp{b}, as before. | |
| 85 | Sometimes people speak of ``the cursor'' when they mean ``point,'' or | ||
| 86 | speak of commands that move point as ``cursor motion'' commands. | ||
| 87 | 87 | ||
| 88 | If you are editing several files in Emacs, each in its own buffer, | 88 | If you are editing several files in Emacs, each in its own buffer, |
| 89 | each buffer has its own point location. A buffer that is not | 89 | each buffer has its own value of point. A buffer that is not |
| 90 | currently displayed remembers its point location in case you display | 90 | currently displayed remembers its value of point if you later display |
| 91 | it again later. When Emacs displays multiple windows, each window has | 91 | it again. Furthermore, if a buffer is displayed in multiple windows, |
| 92 | its own point location. If the same buffer appears in more than one | 92 | each of those windows has its own value of point. |
| 93 | window, each window has its own point position in that buffer. | 93 | |
| 94 | 94 | @xref{Cursor Display}, for options that control how Emacs displays | |
| 95 | On a graphical display, Emacs shows a cursor in each window. The | 95 | the cursor. |
| 96 | selected window's cursor will be blinking. If you use the default, | ||
| 97 | @code{box} cursor type, the selected window's cursor will be solid, | ||
| 98 | and the other cursors are hollow. On a text-only terminal, there is | ||
| 99 | just one cursor, in the selected window; even though the unselected | ||
| 100 | windows have their own point positions, they do not display a cursor. | ||
| 101 | @xref{Cursor Display}, for customizable variables that control cursor | ||
| 102 | display. | ||
| 103 | 96 | ||
| 104 | @node Echo Area | 97 | @node Echo Area |
| 105 | @section The Echo Area | 98 | @section The Echo Area |
| @@ -108,40 +101,41 @@ display. | |||
| 108 | The line at the very bottom of the frame is the @dfn{echo area}. It | 101 | The line at the very bottom of the frame is the @dfn{echo area}. It |
| 109 | is used to display small amounts of text for various purposes. | 102 | is used to display small amounts of text for various purposes. |
| 110 | 103 | ||
| 111 | @dfn{Echoing} means displaying the characters that you type. | 104 | @cindex echoing |
| 112 | Single-character commands, including most simple editing operations, | 105 | The echo area is so-named because one of the things it is used for |
| 113 | are not echoed. Multi-character commands are echoed if you pause | 106 | is @dfn{echoing}, which means displaying the characters of a |
| 114 | while typing them: if you pause for more than a second in the middle | 107 | multi-character command as you type. Single-character commands are |
| 115 | of a command, Emacs echoes all the characters of the command so far, | 108 | not echoed. Multi-character commands (@pxref{Keys}) are echoed if you |
| 116 | to prompt you for the rest of the command. The echoed characters are | 109 | pause for more than a second in the middle of a command. Emacs then |
| 117 | displayed in the echo area. Once echoing has started, the rest of the | 110 | echoes all the characters of the command so far, to prompt you for the |
| 118 | command echoes immediately as you type it. This behavior is designed | 111 | rest. Once echoing has started, the rest of the command echoes |
| 119 | to give confident users fast response, while giving hesitant users | 112 | immediately as you type it. This behavior is designed to give |
| 120 | maximum feedback. @xref{Display Custom}. | 113 | confident users fast response, while giving hesitant users maximum |
| 121 | 114 | feedback. | |
| 122 | @cindex error message in the echo area | 115 | |
| 123 | If a command cannot do its job, it may display an @dfn{error | 116 | @cindex error message |
| 124 | message}. Error messages are also displayed in the echo area. They | 117 | @cindex echo area message |
| 125 | may be accompanied by beeping or by flashing the screen. | 118 | The echo area is also used to display an @dfn{error message} when a |
| 126 | 119 | command cannot do its job. Error messages may be accompanied by | |
| 127 | Some commands display informative messages in the echo area. Unlike | 120 | beeping or by flashing the screen. |
| 128 | error messages, these messages are not announced with a beep or flash. | 121 | |
| 129 | Sometimes the message tells you what the command has done, when this | 122 | Some commands display informative messages in the echo area to tell |
| 130 | is not obvious from looking at the text being edited. Other times, | 123 | you what the command has done, or to provide you with some specific |
| 131 | the sole purpose of a command is to show you a message giving you | 124 | information. These @dfn{informative} messages, unlike error messages, |
| 132 | specific information. For example, @kbd{C-x =} (hold down @key{CTRL} | 125 | are not accompanied with a beep or flash. For example, @kbd{C-x =} |
| 133 | and type @kbd{x}, then let go of @key{CTRL} and type @kbd{=}) displays | 126 | (hold down @key{CTRL} and type @kbd{x}, then let go of @key{CTRL} and |
| 134 | a message describing the character position of point in the text and | 127 | type @kbd{=}) displays a message describing the character at point, |
| 135 | its current column in the window. Commands that take a long time | 128 | its position in the buffer, and its current column in the window. |
| 136 | often display messages ending in @samp{...} while they are working, | 129 | Commands that take a long time often display messages ending in |
| 137 | and add @samp{done} at the end when they are finished. They may also | 130 | @samp{...} while they are working (sometimes also indicating how much |
| 138 | indicate progress with percentages. | 131 | progress has been made, as a percentage), and add @samp{done} when |
| 132 | they are finished. | ||
| 139 | 133 | ||
| 140 | @cindex @samp{*Messages*} buffer | 134 | @cindex @samp{*Messages*} buffer |
| 141 | @cindex saved echo area messages | 135 | @cindex saved echo area messages |
| 142 | @cindex messages saved from echo area | 136 | @cindex messages saved from echo area |
| 143 | @vindex message-log-max | 137 | @vindex message-log-max |
| 144 | Informative echo-area messages are saved in a special buffer named | 138 | Informative echo area messages are saved in a special buffer named |
| 145 | @samp{*Messages*}. (We have not explained buffers yet; see | 139 | @samp{*Messages*}. (We have not explained buffers yet; see |
| 146 | @ref{Buffers}, for more information about them.) If you miss a | 140 | @ref{Buffers}, for more information about them.) If you miss a |
| 147 | message that appeared briefly on the screen, you can switch to the | 141 | message that appeared briefly on the screen, you can switch to the |
| @@ -152,15 +146,17 @@ either; see @ref{Variables}, for more information about them.) Beyond | |||
| 152 | this limit, one line is deleted from the beginning whenever a new | 146 | this limit, one line is deleted from the beginning whenever a new |
| 153 | message line is added at the end. | 147 | message line is added at the end. |
| 154 | 148 | ||
| 149 | @xref{Display Custom}, for options that control how Emacs uses the | ||
| 150 | echo area. | ||
| 151 | |||
| 155 | @cindex minibuffer | 152 | @cindex minibuffer |
| 156 | The echo area is also used to display the @dfn{minibuffer}, a | 153 | The echo area is also used to display the @dfn{minibuffer}, a |
| 157 | special window where you can input arguments to commands, such as the | 154 | special window where you can input arguments to commands, such as the |
| 158 | name of a file to be edited. When the minibuffer is in use, the text | 155 | name of a file to be edited. When the minibuffer is in use, the text |
| 159 | displayed in the echo area begins with a @dfn{prompt string} (usually | 156 | displayed in the echo area begins with a @dfn{prompt string}, and the |
| 160 | ending with a colon); also, the active cursor appears within the | 157 | active cursor appears within the minibuffer, which is temporarily |
| 161 | minibuffer, which is temporarily considered the selected window. You | 158 | considered the selected window. You can always get out of the |
| 162 | can always get out of the minibuffer by typing @kbd{C-g}. | 159 | minibuffer by typing @kbd{C-g}. @xref{Minibuffer}. |
| 163 | @xref{Minibuffer}. | ||
| 164 | 160 | ||
| 165 | @node Mode Line | 161 | @node Mode Line |
| 166 | @section The Mode Line | 162 | @section The Mode Line |
| @@ -171,47 +167,51 @@ can always get out of the minibuffer by typing @kbd{C-g}. | |||
| 171 | what is going on in the current buffer. When there is only one | 167 | what is going on in the current buffer. When there is only one |
| 172 | window, the mode line appears right above the echo area; it is the | 168 | window, the mode line appears right above the echo area; it is the |
| 173 | next-to-last line in the frame. On a graphical display, the mode line | 169 | next-to-last line in the frame. On a graphical display, the mode line |
| 174 | is drawn with a 3D box appearance, and the mode line of the selected | 170 | is drawn with a 3D box appearance. Emacs also usually draws the mode |
| 175 | window has a brighter color than that of unselected windows to make it | 171 | line of the selected window with a different color than that of |
| 176 | stand out. On a text-only terminal, the mode line is usually drawn in | 172 | unselected windows, in order to make it stand out. |
| 177 | inverse video. | ||
| 178 | 173 | ||
| 179 | The text displayed in the mode line has the following format: | 174 | The text displayed in the mode line has the following format: |
| 180 | 175 | ||
| 181 | @example | 176 | @example |
| 182 | -@var{cs}:@var{ch}-@var{fr} @var{buf} @var{pos} @var{line} (@var{major} @var{minor})------ | 177 | @var{cs}:@var{ch}-@var{fr} @var{buf} @var{pos} @var{line} (@var{major} @var{minor}) |
| 183 | @end example | 178 | @end example |
| 184 | 179 | ||
| 185 | @noindent | 180 | @noindent |
| 181 | On a text-only terminal, this text is followed by a series of dashes | ||
| 182 | extending to the right edge of the window. These dashes are omitted | ||
| 183 | on a graphical display. | ||
| 184 | |||
| 186 | The @var{cs} string and the colon character after it describe the | 185 | The @var{cs} string and the colon character after it describe the |
| 187 | character set and newline convention used for the current buffer. | 186 | character set and newline convention used for the current buffer. |
| 188 | Normally, Emacs handles these settings intelligently, but it is | 187 | Normally, Emacs automatically handles these settings for you, but it |
| 189 | sometimes useful to have this information. | 188 | is sometimes useful to have this information. |
| 190 | 189 | ||
| 191 | @var{cs} describes the character set of the buffer (@pxref{Coding | 190 | @var{cs} describes the character set of the text in the buffer |
| 192 | Systems}). If it is a dash (@samp{-}), that indicates the default | 191 | (@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates |
| 193 | state of affairs: no special character set handling, except for the | 192 | no special character set handling (with the possible expection of |
| 194 | end-of-line translations described in the next paragraph. @samp{=} | 193 | end-of-line conventions, described in the next paragraph). @samp{=} |
| 195 | means no conversion whatsoever. Characters represent various nontrivial | 194 | means no conversion whatsoever, and is usually used for files |
| 195 | containing non-textual data. Other characters represent various | ||
| 196 | @dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. | 196 | @dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. |
| 197 | On a text-only terminal, @var{cs} is preceded by two additional | 197 | |
| 198 | characters that describe the coding system for keyboard input and the | 198 | On a text-only terminal, @var{cs} is preceded by two additional |
| 199 | coding system for terminal output. Furthermore, if you are using an | 199 | characters that describe the coding systems for keyboard input and |
| 200 | input method, @var{cs} is preceded by a string that identifies the | 200 | terminal output. Furthermore, if you are using an input method, |
| 201 | input method, which takes the form @samp{@var{i}>}, @samp{@var{i}+}, | 201 | @var{cs} is preceded by a string that identifies the input method |
| 202 | or @samp{@var{i}@@} (@pxref{Input Methods}). | 202 | (@pxref{Input Methods}). |
| 203 | 203 | ||
| 204 | @cindex end-of-line conversion, mode-line indication | 204 | @cindex end-of-line convention, mode-line indication |
| 205 | The character after @var{cs} is usually a colon. However, under | 205 | The character after @var{cs} is usually a colon. If a different |
| 206 | some circumstances a different string is displayed, which indicates a | 206 | string is displayed, that indicates a nontrivial end-of-line |
| 207 | nontrivial end-of-line convention. Usually, lines of text are | 207 | convention for encoding a file. Usually, lines of text are separated |
| 208 | separated by @dfn{newline characters}, but two other conventions are | 208 | by @dfn{newline characters} in a file, but two other conventions are |
| 209 | sometimes used. The MS-DOS convention is to use a ``carriage-return'' | 209 | sometimes used. The MS-DOS convention uses a ``carriage-return'' |
| 210 | character followed by a ``linefeed'' character; when editing such | 210 | character followed by a ``linefeed'' character; when editing such |
| 211 | files, the colon changes to either a backslash (@samp{\}) or | 211 | files, the colon changes to either a backslash (@samp{\}) or |
| 212 | @samp{(DOS)}, depending on the operating system. The Macintosh | 212 | @samp{(DOS)}, depending on the operating system. Another convention, |
| 213 | end-of-line convention is to use a ``carriage-return'' character | 213 | employed by older Macintosh systems, uses a ``carriage-return'' |
| 214 | instead of a newline; when editing such files, the colon indicator | 214 | character instead of a newline; when editing such files, the colon |
| 215 | changes to either a forward slash (@samp{/}) or @samp{(Mac)}. On some | 215 | changes to either a forward slash (@samp{/}) or @samp{(Mac)}. On some |
| 216 | systems, Emacs displays @samp{(Unix)} instead of the colon for files | 216 | systems, Emacs displays @samp{(Unix)} instead of the colon for files |
| 217 | that use newline as the line separator. | 217 | that use newline as the line separator. |
| @@ -234,14 +234,14 @@ only on text-only terminals. The initial frame's name is @samp{F1}. | |||
| 234 | Usually, this is the same as the name of a file you are editing. | 234 | Usually, this is the same as the name of a file you are editing. |
| 235 | @xref{Buffers}. | 235 | @xref{Buffers}. |
| 236 | 236 | ||
| 237 | @var{pos} tells you whether there is additional text above the top of | 237 | @var{pos} tells you whether there is additional text above the top |
| 238 | the window, or below the bottom. If your buffer is small and it is all | 238 | of the window, or below the bottom. If your buffer is small and all |
| 239 | visible in the window, @var{pos} is @samp{All}. Otherwise, it is | 239 | of it is visible in the window, @var{pos} is @samp{All}. Otherwise, |
| 240 | @samp{Top} if you are looking at the beginning of the buffer, @samp{Bot} | 240 | it is @samp{Top} if you are looking at the beginning of the buffer, |
| 241 | if you are looking at the end of the buffer, or @samp{@var{nn}%}, where | 241 | @samp{Bot} if you are looking at the end of the buffer, or |
| 242 | @var{nn} is the percentage of the buffer above the top of the window. | 242 | @samp{@var{nn}%}, where @var{nn} is the percentage of the buffer above |
| 243 | With Size Indication mode, you can display the size of the buffer as | 243 | the top of the window. With Size Indication mode, you can display the |
| 244 | well. @xref{Optional Mode Line}. | 244 | size of the buffer as well. @xref{Optional Mode Line}. |
| 245 | 245 | ||
| 246 | @var{line} is the character @samp{L} followed by the line number at | 246 | @var{line} is the character @samp{L} followed by the line number at |
| 247 | point. (You can display the current column number too, by turning on | 247 | point. (You can display the current column number too, by turning on |
| @@ -249,16 +249,14 @@ Column Number mode. @xref{Optional Mode Line}.) | |||
| 249 | 249 | ||
| 250 | @var{major} is the name of the @dfn{major mode} used in the buffer. | 250 | @var{major} is the name of the @dfn{major mode} used in the buffer. |
| 251 | A major mode is a principal editing mode for the buffer, such as Text | 251 | A major mode is a principal editing mode for the buffer, such as Text |
| 252 | mode, Lisp mode, C mode, and so forth. @xref{Major Modes}. | 252 | mode, Lisp mode, C mode, and so forth. @xref{Major Modes}. Some |
| 253 | 253 | major modes display additional information after the major mode name. | |
| 254 | Some major modes display additional information after the major mode | 254 | For example, Compilation buffers and Shell buffers display the status |
| 255 | name. For example, Rmail buffers display the current message number and | 255 | of the subprocess. |
| 256 | the total number of messages. Compilation buffers and Shell buffers | ||
| 257 | display the status of the subprocess. | ||
| 258 | 256 | ||
| 259 | @var{minor} is a list of some of the @dfn{minor modes} turned on in | 257 | @var{minor} is a list of some of the enabled @dfn{minor modes}, |
| 260 | the buffer. Minor modes are optional editing modes that provide | 258 | which are optional editing modes that provide additional features on |
| 261 | additional features on top of the major mode. @xref{Minor Modes}. | 259 | top of the major mode. @xref{Minor Modes}. |
| 262 | 260 | ||
| 263 | Some features are listed together with the minor modes whenever they | 261 | Some features are listed together with the minor modes whenever they |
| 264 | are turned on, even though they are not really minor modes. | 262 | are turned on, even though they are not really minor modes. |
| @@ -271,9 +269,8 @@ restricted to only a portion of its text (@pxref{Narrowing}). | |||
| 271 | brackets (@samp{[@dots{}]}) appear around the parentheses that | 269 | brackets (@samp{[@dots{}]}) appear around the parentheses that |
| 272 | surround the modes. If Emacs is in one recursive editing level within | 270 | surround the modes. If Emacs is in one recursive editing level within |
| 273 | another, double square brackets appear, and so on. Since recursive | 271 | another, double square brackets appear, and so on. Since recursive |
| 274 | editing levels affect Emacs globally, not just one buffer, the square | 272 | editing levels affect Emacs globally, such square brackets appear in |
| 275 | brackets appear in every window's mode line or not in any of them. | 273 | the mode line of every window. @xref{Recursive Edit}. |
| 276 | @xref{Recursive Edit}.@refill | ||
| 277 | 274 | ||
| 278 | You can change the appearance of the mode line as well as the format | 275 | You can change the appearance of the mode line as well as the format |
| 279 | of its contents. @xref{Optional Mode Line}. In addition, the mode | 276 | of its contents. @xref{Optional Mode Line}. In addition, the mode |
| @@ -293,10 +290,10 @@ here, as you can more easily see them yourself. | |||
| 293 | @findex tmm-menubar | 290 | @findex tmm-menubar |
| 294 | @findex menu-bar-open | 291 | @findex menu-bar-open |
| 295 | On a graphical display, you can use the mouse to choose a command | 292 | On a graphical display, you can use the mouse to choose a command |
| 296 | from the menu bar. A right-arrow at the end of a menu item means it | 293 | from the menu bar. An arrow on the right edge of a menu item means it |
| 297 | leads to a subsidiary menu, or @dfn{submenu}. A @samp{...} at the end | 294 | leads to a subsidiary menu, or @dfn{submenu}. A @samp{...} at the end |
| 298 | of a menu item means that the command invoked will prompt you for | 295 | of a menu item means that the command will prompt you for further |
| 299 | further input before it actually does anything. | 296 | input before it actually does anything. |
| 300 | 297 | ||
| 301 | Some of the commands in the menu bar have ordinary key bindings as | 298 | Some of the commands in the menu bar have ordinary key bindings as |
| 302 | well; if so, a key binding is shown in parentheses after the item | 299 | well; if so, a key binding is shown in parentheses after the item |
| @@ -310,14 +307,13 @@ You can then navigate the menus with the arrow keys. To activate a | |||
| 310 | selected menu item, press @key{RET}; to cancel menu navigation, press | 307 | selected menu item, press @key{RET}; to cancel menu navigation, press |
| 311 | @key{ESC}. | 308 | @key{ESC}. |
| 312 | 309 | ||
| 313 | On text-only terminals with no mouse, you can use the menu bar by | 310 | On a text-only terminal, you can use the menu bar by typing |
| 314 | typing @kbd{M-`} or @key{F10} (these run the command | 311 | @kbd{M-`} or @key{F10} (these run the command @code{tmm-menubar}). |
| 315 | @code{tmm-menubar}). This lets you select a menu item with the | 312 | This lets you select a menu item with the keyboard. A provisional |
| 316 | keyboard. A provisional choice appears in the echo area. You can use | 313 | choice appears in the echo area. You can use the up and down arrow |
| 317 | the up and down arrow keys to move through the menu to different | 314 | keys to move through the menu to different items, and then you can |
| 318 | items, and then you can type @key{RET} to select the item. | 315 | type @key{RET} to select the item. Each menu item is also designated |
| 319 | 316 | by a letter or digit (usually the initial of some word in the item's | |
| 320 | Each menu item also has an assigned letter or digit which designates | 317 | name). This letter or digit is separated from the item name by |
| 321 | that item; it is usually the initial of some word in the item's name. | 318 | @samp{=>}. You can type the item's letter or digit to select the |
| 322 | This letter or digit is separated from the item name by @samp{=>}. You | 319 | item. |
| 323 | can type the item's letter or digit to select the item. | ||
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 0b0e4867ae5..96ccaa2b3c4 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -332,6 +332,8 @@ pages are often meaningful divisions of the file, Emacs provides | |||
| 332 | commands to move over them and operate on them. | 332 | commands to move over them and operate on them. |
| 333 | 333 | ||
| 334 | @table @kbd | 334 | @table @kbd |
| 335 | @item M-x what-page | ||
| 336 | Display the page number of point, and the line number within that page. | ||
| 335 | @item C-x [ | 337 | @item C-x [ |
| 336 | Move point to previous page boundary (@code{backward-page}). | 338 | Move point to previous page boundary (@code{backward-page}). |
| 337 | @item C-x ] | 339 | @item C-x ] |
| @@ -342,6 +344,10 @@ Put point and mark around this page (or another page) (@code{mark-page}). | |||
| 342 | Count the lines in this page (@code{count-lines-page}). | 344 | Count the lines in this page (@code{count-lines-page}). |
| 343 | @end table | 345 | @end table |
| 344 | 346 | ||
| 347 | @findex what-page | ||
| 348 | @kbd{M-x what-page} counts pages from the beginning of the file, and | ||
| 349 | counts lines within the page, showing both numbers in the echo area. | ||
| 350 | |||
| 345 | @kindex C-x [ | 351 | @kindex C-x [ |
| 346 | @kindex C-x ] | 352 | @kindex C-x ] |
| 347 | @findex forward-page | 353 | @findex forward-page |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 27c2597c6a3..f822b4bebdf 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2011-10-09 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * buffers.texi (The Buffer List): Describe how bury-buffer deals | ||
| 4 | with the selected window. | ||
| 5 | * windows.texi (Buffers and Windows): Reformulate text on how | ||
| 6 | replace-buffer-in-windows deals with a window. | ||
| 7 | (Quitting Windows): Describe how quit-window deals with a | ||
| 8 | standalone frame. Describe new option frame-auto-hide-function. | ||
| 9 | |||
| 10 | 2011-10-08 Glenn Morris <rgm@gnu.org> | ||
| 11 | |||
| 12 | * symbols.texi (Other Plists): Markup fix. (Bug#9702) | ||
| 13 | |||
| 14 | * positions.texi (Excursions): Update warning message. | ||
| 15 | |||
| 16 | 2011-10-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 17 | |||
| 18 | * display.texi (Low-Level Font, Face Attributes, Font Lookup): Fix | ||
| 19 | Emacs manual xref (Bug#9675). | ||
| 20 | |||
| 1 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> | 21 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 22 | ||
| 3 | * windows.texi (Textual Scrolling): Document scroll-up-command, | 23 | * windows.texi (Textual Scrolling): Document scroll-up-command, |
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index ce1a8b0fb4e..816d0f9faa8 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -884,23 +884,28 @@ This buffer therefore becomes the least desirable candidate for | |||
| 884 | @code{other-buffer} to return. The argument can be either a buffer | 884 | @code{other-buffer} to return. The argument can be either a buffer |
| 885 | itself or the name of one. | 885 | itself or the name of one. |
| 886 | 886 | ||
| 887 | @code{bury-buffer} operates on each frame's @code{buffer-list} parameter | 887 | This functions operates on each frame's @code{buffer-list} parameter as |
| 888 | as well as the fundamental buffer list; therefore, the buffer that you | 888 | well as the fundamental buffer list; therefore, the buffer that you bury |
| 889 | bury will come last in the value of @code{(buffer-list @var{frame})} and | 889 | will come last in the value of @code{(buffer-list @var{frame})} and in |
| 890 | in the value of @code{(buffer-list)}. | 890 | the value of @code{(buffer-list)}. In addition, it also puts the buffer |
| 891 | 891 | at the end of the list of buffer of the selected window (@pxref{Window | |
| 892 | If @var{buffer-or-name} is @code{nil} or omitted, this means to bury | 892 | History}) provided it is shown in that window. |
| 893 | the current buffer. In addition, if the buffer is displayed in the | 893 | |
| 894 | selected window, this switches to some other buffer (obtained using | 894 | If @var{buffer-or-name} is @code{nil} or omitted, this means to bury the |
| 895 | @code{other-buffer}) in the selected window. @xref{Switching | 895 | current buffer. In addition, if the current buffer is displayed in the |
| 896 | Buffers}. But if the selected window is dedicated to its buffer, it | 896 | selected window, this makes sure that the window is either deleted or |
| 897 | deletes that window if there are other windows left on its frame. | 897 | another buffer is shown in it. More precisely, if the window is |
| 898 | Otherwise, if the selected window is the only window on its frame, it | 898 | dedicated (@pxref{Dedicated Windows}) and there are other windows on its |
| 899 | iconifies that frame. If @var{buffer-or-name} is displayed in some | 899 | frame, the window is deleted. If the window is both dedicated and the |
| 900 | only window on its frame's terminal, the function specified by | ||
| 901 | @code{frame-auto-hide-function} (@pxref{Quitting Windows}) will deal | ||
| 902 | with the window. If the window is not dedicated to its buffer, it calls | ||
| 903 | @code{switch-to-prev-buffer} (@pxref{Window History}) to show another | ||
| 904 | buffer in that window. If @var{buffer-or-name} is displayed in some | ||
| 900 | other window, it remains displayed there. | 905 | other window, it remains displayed there. |
| 901 | 906 | ||
| 902 | To replace a buffer in all the windows that display it, use | 907 | To replace a buffer in all the windows that display it, use |
| 903 | @code{replace-buffer-in-windows}. @xref{Buffers and Windows}. | 908 | @code{replace-buffer-in-windows}, @xref{Buffers and Windows}. |
| 904 | @end deffn | 909 | @end deffn |
| 905 | 910 | ||
| 906 | @deffn Command unbury-buffer | 911 | @deffn Command unbury-buffer |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 724c46300fd..18cb93557e9 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -2148,12 +2148,11 @@ When specifying this attribute using @code{set-face-attribute} | |||
| 2148 | entity, or a string. Emacs converts such values to an appropriate | 2148 | entity, or a string. Emacs converts such values to an appropriate |
| 2149 | font object, and stores that font object as the actual attribute | 2149 | font object, and stores that font object as the actual attribute |
| 2150 | value. If you specify a string, the contents of the string should be | 2150 | value. If you specify a string, the contents of the string should be |
| 2151 | a font name (@pxref{Font X,, Font Specification Options, emacs, The | 2151 | a font name (@pxref{Fonts,,, emacs, The GNU Emacs Manual}); if the |
| 2152 | GNU Emacs Manual}); if the font name is an XLFD containing wildcards, | 2152 | font name is an XLFD containing wildcards, Emacs chooses the first |
| 2153 | Emacs chooses the first font matching those wildcards. Specifying | 2153 | font matching those wildcards. Specifying this attribute also changes |
| 2154 | this attribute also changes the values of the @code{:family}, | 2154 | the values of the @code{:family}, @code{:foundry}, @code{:width}, |
| 2155 | @code{:foundry}, @code{:width}, @code{:height}, @code{:weight}, and | 2155 | @code{:height}, @code{:weight}, and @code{:slant} attributes. |
| 2156 | @code{:slant} attributes. | ||
| 2157 | 2156 | ||
| 2158 | @item :inherit | 2157 | @item :inherit |
| 2159 | The name of a face from which to inherit attributes, or a list of face | 2158 | The name of a face from which to inherit attributes, or a list of face |
| @@ -2854,11 +2853,11 @@ nominal heights and widths would suggest. | |||
| 2854 | @defun x-list-fonts name &optional reference-face frame maximum width | 2853 | @defun x-list-fonts name &optional reference-face frame maximum width |
| 2855 | This function returns a list of available font names that match | 2854 | This function returns a list of available font names that match |
| 2856 | @var{name}. @var{name} should be a string containing a font name in | 2855 | @var{name}. @var{name} should be a string containing a font name in |
| 2857 | either the Fontconfig, GTK, or XLFD format (@pxref{Font X,, Font | 2856 | either the Fontconfig, GTK, or XLFD format (@pxref{Fonts,,, emacs, The |
| 2858 | Specification Options, emacs, The GNU Emacs Manual}). Within an XLFD | 2857 | GNU Emacs Manual}). Within an XLFD string, wildcard characters may be |
| 2859 | string, wildcard characters may be used: the @samp{*} character | 2858 | used: the @samp{*} character matches any substring, and the @samp{?} |
| 2860 | matches any substring, and the @samp{?} character matches any single | 2859 | character matches any single character. Case is ignored when matching |
| 2861 | character. Case is ignored when matching font names. | 2860 | font names. |
| 2862 | 2861 | ||
| 2863 | If the optional arguments @var{reference-face} and @var{frame} are | 2862 | If the optional arguments @var{reference-face} and @var{frame} are |
| 2864 | specified, the returned list includes only fonts that are the same | 2863 | specified, the returned list includes only fonts that are the same |
| @@ -3108,8 +3107,7 @@ specifications are as follows: | |||
| 3108 | @table @code | 3107 | @table @code |
| 3109 | @item :name | 3108 | @item :name |
| 3110 | The font name (a string), in either XLFD, Fontconfig, or GTK format. | 3109 | The font name (a string), in either XLFD, Fontconfig, or GTK format. |
| 3111 | @xref{Font X,, Font Specification Options, emacs, The GNU Emacs | 3110 | @xref{Fonts,,, emacs, The GNU Emacs Manual}. |
| 3112 | Manual}. | ||
| 3113 | 3111 | ||
| 3114 | @item :family | 3112 | @item :family |
| 3115 | @itemx :foundry | 3113 | @itemx :foundry |
| @@ -3226,10 +3224,9 @@ specified by @var{font}. | |||
| 3226 | 3224 | ||
| 3227 | @defun font-xlfd-name font &optional fold-wildcards | 3225 | @defun font-xlfd-name font &optional fold-wildcards |
| 3228 | This function returns the XLFD (X Logical Font Descriptor), a string, | 3226 | This function returns the XLFD (X Logical Font Descriptor), a string, |
| 3229 | matching @var{font}. @xref{Font X,, Font Specification Options, | 3227 | matching @var{font}. @xref{Fonts,,, emacs, The GNU Emacs Manual}, for |
| 3230 | emacs, The GNU Emacs Manual}, for information about XLFDs. If the | 3228 | information about XLFDs. If the name is too long for an XLFD (which |
| 3231 | name is too long for an XLFD (which can contain at most 255 | 3229 | can contain at most 255 characters), the function returns @code{nil}. |
| 3232 | characters), the function returns @code{nil}. | ||
| 3233 | 3230 | ||
| 3234 | If the optional argument @var{fold-wildcards} is non-@code{nil}, | 3231 | If the optional argument @var{fold-wildcards} is non-@code{nil}, |
| 3235 | consecutive wildcards in the XLFD are folded into one. | 3232 | consecutive wildcards in the XLFD are folded into one. |
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 1124d58ebcc..74444c7ad60 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi | |||
| @@ -832,7 +832,7 @@ consequences, so the byte compiler warns if you call @code{set-buffer} | |||
| 832 | during an excursion: | 832 | during an excursion: |
| 833 | 833 | ||
| 834 | @example | 834 | @example |
| 835 | Warning: @code{save-excursion} defeated by @code{set-buffer} | 835 | Warning: Use `with-current-buffer' rather than save-excursion+set-buffer |
| 836 | @end example | 836 | @end example |
| 837 | 837 | ||
| 838 | @noindent | 838 | @noindent |
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 60d14d567d4..79b3249d760 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi | |||
| @@ -541,7 +541,7 @@ returns @code{nil}. For example, | |||
| 541 | (plist-get '(foo 4 bad) 'foo) | 541 | (plist-get '(foo 4 bad) 'foo) |
| 542 | @result{} 4 | 542 | @result{} 4 |
| 543 | (plist-get '(foo 4 bad) 'bad) | 543 | (plist-get '(foo 4 bad) 'bad) |
| 544 | @result{} @code{nil} | 544 | @result{} nil |
| 545 | (plist-get '(foo 4 bad) 'bar) | 545 | (plist-get '(foo 4 bad) 'bar) |
| 546 | @result{} nil | 546 | @result{} nil |
| 547 | @end example | 547 | @end example |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index bffea19210c..41ccbaafd49 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -2076,16 +2076,17 @@ This command replaces @var{buffer-or-name} with some other buffer, in | |||
| 2076 | all windows displaying it. For each such window, it choose another | 2076 | all windows displaying it. For each such window, it choose another |
| 2077 | buffer using @code{switch-to-prev-buffer} (@pxref{Window History}). | 2077 | buffer using @code{switch-to-prev-buffer} (@pxref{Window History}). |
| 2078 | 2078 | ||
| 2079 | @var{buffer-or-name} may be a buffer, or the name of an existing | 2079 | The argument @var{buffer-or-name} may be a buffer, or the name of an |
| 2080 | buffer; it defaults to the current buffer. | 2080 | existing buffer; it defaults to the current buffer. |
| 2081 | 2081 | ||
| 2082 | If a window displaying @var{buffer-or-name} is dedicated | 2082 | If a window displaying @var{buffer-or-name} is dedicated |
| 2083 | (@pxref{Dedicated Windows}), has never displayed any other buffers and | 2083 | (@pxref{Dedicated Windows}) and is not the only window on its frame, |
| 2084 | is not the only window on its frame, that window is deleted. If that | 2084 | that window is deleted. If that window is the only window on its frame |
| 2085 | window is the only window on its frame and there are other frames on the | 2085 | and there are other frames on the frame's terminal, that frame is dealt |
| 2086 | frame's terminal, that frame is deleted too; otherwise, the buffer | 2086 | with by the function spcecified by @code{frame-auto-hide-function} |
| 2087 | provided by the function @code{switch-to-prev-buffer} (@pxref{Window | 2087 | (@pxref{Quitting Windows}). Otherwise, the buffer provided by the |
| 2088 | History}) is displayed instead. | 2088 | function @code{switch-to-prev-buffer} (@pxref{Window History}) is |
| 2089 | displayed in the window instead. | ||
| 2089 | @end deffn | 2090 | @end deffn |
| 2090 | 2091 | ||
| 2091 | 2092 | ||
| @@ -2784,14 +2785,14 @@ non-@code{nil} value. | |||
| 2784 | @section Quitting Windows | 2785 | @section Quitting Windows |
| 2785 | 2786 | ||
| 2786 | When you want to get rid of a window used for displaying a buffer you | 2787 | When you want to get rid of a window used for displaying a buffer you |
| 2787 | can use the function @code{delete-window} (@pxref{Deleting Windows}) to | 2788 | can call @code{delete-window} or @code{delete-windows-on} |
| 2788 | remove that window from its frame. If the buffer has been shown on a | 2789 | (@pxref{Deleting Windows}) to remove that window from its frame. If the |
| 2789 | separate frame, you might want to call @code{delete-frame} | 2790 | buffer is shown on a separate frame, you might want to call |
| 2790 | (@pxref{Deleting Frames}) instead. If, on the other hand, a window has | 2791 | @code{delete-frame} (@pxref{Deleting Frames}) instead. If, on the other |
| 2791 | been reused for displaying the buffer, you might prefer showing the | 2792 | hand, a window has been reused for displaying the buffer, you might |
| 2792 | buffer previously shown in that window by calling the function | 2793 | prefer showing the buffer previously shown in that window by calling the |
| 2793 | @code{switch-to-prev-buffer} (@pxref{Window History}). Finally, you | 2794 | function @code{switch-to-prev-buffer} (@pxref{Window History}). |
| 2794 | might want to either bury (@pxref{The Buffer List}) or kill | 2795 | Finally, you might want to either bury (@pxref{The Buffer List}) or kill |
| 2795 | (@pxref{Killing Buffers}) the window's buffer. | 2796 | (@pxref{Killing Buffers}) the window's buffer. |
| 2796 | 2797 | ||
| 2797 | The following function uses information on how the window for | 2798 | The following function uses information on how the window for |
| @@ -2807,9 +2808,12 @@ instead of burying it. | |||
| 2807 | Quitting @var{window} means to proceed as follows: If @var{window} was | 2808 | Quitting @var{window} means to proceed as follows: If @var{window} was |
| 2808 | created specially for displaying its current buffer, delete @var{window} | 2809 | created specially for displaying its current buffer, delete @var{window} |
| 2809 | provided its frame contains at least one other live window. If | 2810 | provided its frame contains at least one other live window. If |
| 2810 | @var{window} is the only window on its frame and other frames still | 2811 | @var{window} is the only window on its frame and there are other frames |
| 2811 | exist, delete the frame together with @var{window}. If, however, there | 2812 | on the frame's terminal, the value of @var{kill} determines how to |
| 2812 | are no other frames left, display some other buffer in @var{window}. | 2813 | proceed with the window. If @var{kill} is @code{nil}, the fate of the |
| 2814 | frame is determined by calling @code{frame-auto-hide-function} (see | ||
| 2815 | below) with that frame as sole argument. If @var{kill} is | ||
| 2816 | non-@code{nil}, the frame is deleted unconditionally. | ||
| 2813 | 2817 | ||
| 2814 | If @var{window} was reused for displaying its buffer, this command tries | 2818 | If @var{window} was reused for displaying its buffer, this command tries |
| 2815 | to display the buffer previously shown in it. It also tries to restore | 2819 | to display the buffer previously shown in it. It also tries to restore |
| @@ -2831,6 +2835,31 @@ stored in @var{window}'s @code{quit-restore} window parameter | |||
| 2831 | (@pxref{Window Parameters}) and resets that parameter to @code{nil} | 2835 | (@pxref{Window Parameters}) and resets that parameter to @code{nil} |
| 2832 | after it's done. | 2836 | after it's done. |
| 2833 | 2837 | ||
| 2838 | The following option specifies how to deal with a frame containing just | ||
| 2839 | one window that shall be either quit or whose buffer shall be buried. | ||
| 2840 | |||
| 2841 | @defopt frame-auto-hide-function | ||
| 2842 | The function specified by this option is called to automatically hide | ||
| 2843 | frames. This function is called with one argument - a frame. | ||
| 2844 | |||
| 2845 | The function specified here is called by @code{bury-buffer} (@pxref{The | ||
| 2846 | Buffer List}) when the selected window is dedicated and shows the buffer | ||
| 2847 | that shall be buried. It is also called by @code{quit-window} (see | ||
| 2848 | above) when the frame of the window that shall be quit has been | ||
| 2849 | specially created for displaying that window's buffer and the buffer | ||
| 2850 | shall be buried. | ||
| 2851 | |||
| 2852 | The default is to call @code{iconify-frame} (@pxref{Visibility of | ||
| 2853 | Frames}). Alternatively, you may either specify @code{delete-frame} | ||
| 2854 | (@pxref{Deleting Frames}) to remove the frame from its display, | ||
| 2855 | @code{ignore} to leave the frame unchanged, or any other function that | ||
| 2856 | can take a frame as its sole argument. | ||
| 2857 | |||
| 2858 | Note that the function specified by this option is called if and only if | ||
| 2859 | there's at least one other frame on the terminal of the frame it's | ||
| 2860 | supposed to handle and that frame contains only one live window. | ||
| 2861 | @end defopt | ||
| 2862 | |||
| 2834 | 2863 | ||
| 2835 | @node Window Point | 2864 | @node Window Point |
| 2836 | @section Windows and Point | 2865 | @section Windows and Point |
diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index a5146be9175..b9175ce51ea 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-10-06 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * emacsclient.1: Document how -a "" starts the daemon. | ||
| 4 | |||
| 1 | 2011-09-17 Sven Joachim <svenjoac@gmx.de> | 5 | 2011-09-17 Sven Joachim <svenjoac@gmx.de> |
| 2 | 6 | ||
| 3 | * emacs.1: Escape a dash. | 7 | * emacs.1: Escape a dash. |
diff --git a/doc/man/emacsclient.1 b/doc/man/emacsclient.1 index 4020b6c0b6a..a5abcff0d5d 100644 --- a/doc/man/emacsclient.1 +++ b/doc/man/emacsclient.1 | |||
| @@ -52,8 +52,8 @@ options starting with two dashes (`-'). | |||
| 52 | .B \-a, \-\-alternate-editor=EDITOR | 52 | .B \-a, \-\-alternate-editor=EDITOR |
| 53 | if the Emacs server is not running, run the specified editor instead. | 53 | if the Emacs server is not running, run the specified editor instead. |
| 54 | This can also be specified via the `ALTERNATE_EDITOR' environment variable. | 54 | This can also be specified via the `ALTERNATE_EDITOR' environment variable. |
| 55 | If the value of EDITOR is the empty string, then Emacs is started in | 55 | If the value of EDITOR is the empty string, run `emacs --daemon' to |
| 56 | daemon mode and emacsclient will try to connect to it. | 56 | start Emacs in daemon mode, and try to connect to it. |
| 57 | .TP | 57 | .TP |
| 58 | .B -c, \-\-create-frame | 58 | .B -c, \-\-create-frame |
| 59 | create a new frame instead of trying to use the current Emacs frame | 59 | create a new frame instead of trying to use the current Emacs frame |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 6af229bbdda..b1bc1cffec2 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-10-08 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in: Fix ert rules. | ||
| 4 | |||
| 5 | 2011-10-06 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 6 | |||
| 7 | * gnus.texi (Gnus Utility Functions): Add more references and | ||
| 8 | explanations (bug#9683). | ||
| 9 | |||
| 1 | 2011-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | 10 | 2011-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 11 | ||
| 3 | * gnus.texi (Archived Messages): Note the default (bug#9552). | 12 | * gnus.texi (Archived Messages): Note the default (bug#9552). |
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 28a949f81e2..34f136b09ff 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in | |||
| @@ -370,12 +370,13 @@ erc.pdf: ${srcdir}/erc.texi | |||
| 370 | $(ENVADD) $(TEXI2PDF) $< | 370 | $(ENVADD) $(TEXI2PDF) $< |
| 371 | 371 | ||
| 372 | ert : $(infodir)/ert | 372 | ert : $(infodir)/ert |
| 373 | $(infodir)/ert: ert.texi $(infodir) | 373 | $(infodir)/ert: ert.texi |
| 374 | cd $(srcdir); $(MAKEINFO) ert.texi | 374 | $(mkinfodir) |
| 375 | ert.dvi: ert.texi | 375 | cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< |
| 376 | $(ENVADD) $(TEXI2DVI) ${srcdir}/ert.texi | 376 | ert.dvi: ${srcdir}/ert.texi |
| 377 | ert.pdf: ert.texi | 377 | $(ENVADD) $(TEXI2DVI) $< |
| 378 | $(ENVADD) $(TEXI2PDF) ${srcdir}/ert.texi | 378 | ert.pdf: ${srcdir}/ert.texi |
| 379 | $(ENVADD) $(TEXI2PDF) $< | ||
| 379 | 380 | ||
| 380 | eshell : $(infodir)/eshell | 381 | eshell : $(infodir)/eshell |
| 381 | $(infodir)/eshell: eshell.texi | 382 | $(infodir)/eshell: eshell.texi |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 211bfdb5509..ad1d45cca1a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -29093,7 +29093,7 @@ Takes an unprefixed group name and a select method, and returns the full | |||
| 29093 | 29093 | ||
| 29094 | @item gnus-get-info | 29094 | @item gnus-get-info |
| 29095 | @findex gnus-get-info | 29095 | @findex gnus-get-info |
| 29096 | Returns the group info list for @var{group}. | 29096 | Returns the group info list for @var{group} (@pxref{Group Info}). |
| 29097 | 29097 | ||
| 29098 | @item gnus-group-unread | 29098 | @item gnus-group-unread |
| 29099 | @findex gnus-group-unread | 29099 | @findex gnus-group-unread |
| @@ -29102,7 +29102,8 @@ unknown. | |||
| 29102 | 29102 | ||
| 29103 | @item gnus-active | 29103 | @item gnus-active |
| 29104 | @findex gnus-active | 29104 | @findex gnus-active |
| 29105 | The active entry for @var{group}. | 29105 | The active entry (i.e., a cons cell containing the lowest and highest |
| 29106 | article numbers) for @var{group}. | ||
| 29106 | 29107 | ||
| 29107 | @item gnus-set-active | 29108 | @item gnus-set-active |
| 29108 | @findex gnus-set-active | 29109 | @findex gnus-set-active |
| @@ -29137,7 +29138,9 @@ Returns the select method corresponding to @var{server}. | |||
| 29137 | 29138 | ||
| 29138 | @item gnus-server-equal | 29139 | @item gnus-server-equal |
| 29139 | @findex gnus-server-equal | 29140 | @findex gnus-server-equal |
| 29140 | Says whether two virtual servers are equal. | 29141 | Says whether two virtual servers are essentially equal. For instance, |
| 29142 | two virtual servers may have server parameters in different order, but | ||
| 29143 | this function will consider them equal. | ||
| 29141 | 29144 | ||
| 29142 | @item gnus-group-native-p | 29145 | @item gnus-group-native-p |
| 29143 | @findex gnus-group-native-p | 29146 | @findex gnus-group-native-p |
| @@ -29153,8 +29156,9 @@ Says whether @var{group} is foreign or not. | |||
| 29153 | 29156 | ||
| 29154 | @item gnus-group-find-parameter | 29157 | @item gnus-group-find-parameter |
| 29155 | @findex gnus-group-find-parameter | 29158 | @findex gnus-group-find-parameter |
| 29156 | Returns the parameter list of @var{group}. If given a second parameter, | 29159 | Returns the parameter list of @var{group} (@pxref{Group Parameters}). |
| 29157 | returns the value of that parameter for @var{group}. | 29160 | If given a second parameter, returns the value of that parameter for |
| 29161 | @var{group}. | ||
| 29158 | 29162 | ||
| 29159 | @item gnus-group-set-parameter | 29163 | @item gnus-group-set-parameter |
| 29160 | @findex gnus-group-set-parameter | 29164 | @findex gnus-group-set-parameter |
| @@ -96,27 +96,22 @@ and also when HOME is set to C:\ by default. | |||
| 96 | 96 | ||
| 97 | *** shell-mode uses pcomplete rules, with the standard completion UI. | 97 | *** shell-mode uses pcomplete rules, with the standard completion UI. |
| 98 | 98 | ||
| 99 | *** Many packages have been changed to use completion-at-point rather than | 99 | *** Many packages have been changed to use `completion-at-point' |
| 100 | their own completion code. | 100 | rather than their own completion code. |
| 101 | 101 | ||
| 102 | *** `completion-at-point' now handles tags and semantic completion. | ||
| 103 | --- | ||
| 102 | *** Completion in a non-minibuffer now tries to detect the end of completion | 104 | *** Completion in a non-minibuffer now tries to detect the end of completion |
| 103 | and pops down the *Completions* buffer accordingly. | 105 | and pops down the *Completions* buffer accordingly. |
| 104 | 106 | +++ | |
| 105 | *** Completion can cycle, depending on completion-cycle-threshold. | 107 | *** Completion can cycle, depending on completion-cycle-threshold. |
| 106 | 108 | +++ | |
| 107 | *** New completion style `substring'. | 109 | *** New completion style `substring'. |
| 108 | 110 | ||
| 109 | *** Completion style can be set per-category `completion-category-overrides'. | 111 | *** Completion style can be set per-category `completion-category-overrides'. |
| 110 | 112 | ||
| 111 | *** Completion of buffers now uses substring completion by default. | 113 | *** Completion of buffers now uses substring completion by default. |
| 112 | 114 | ||
| 113 | *** `completing-read' can be customized using the new variable | ||
| 114 | `completing-read-function'. | ||
| 115 | |||
| 116 | *** minibuffer-local-filename-must-match-map is not used any more. | ||
| 117 | Instead, the bindings in minibuffer-local-filename-completion-map are combined | ||
| 118 | with minibuffer-local-must-match-map. | ||
| 119 | |||
| 120 | ** Mail changes | 115 | ** Mail changes |
| 121 | 116 | ||
| 122 | The default of `send-mail-function' is now `sendmail-query-once', | 117 | The default of `send-mail-function' is now `sendmail-query-once', |
| @@ -453,9 +448,10 @@ isearch-yank-kill. | |||
| 453 | *** M-s C-e in Isearch is now bound to isearch-yank-line. | 448 | *** M-s C-e in Isearch is now bound to isearch-yank-line. |
| 454 | 449 | ||
| 455 | +++ | 450 | +++ |
| 456 | ** New command `count-words-region'. This does what you expect. | 451 | ** New commands `count-words-region' and `count-words'. |
| 457 | 452 | ||
| 458 | ** completion-at-point now handles tags and semantic completion. | 453 | *** `count-lines-region' is now an alias for `count-words-region', |
| 454 | bound to M-=, which shows the number of lines, words, and characters. | ||
| 459 | 455 | ||
| 460 | ** The default value of `backup-by-copying-when-mismatch' is now t. | 456 | ** The default value of `backup-by-copying-when-mismatch' is now t. |
| 461 | 457 | ||
| @@ -724,6 +720,8 @@ in the Rmail incoming message. | |||
| 724 | 720 | ||
| 725 | ** Shell mode | 721 | ** Shell mode |
| 726 | 722 | ||
| 723 | *** Shell mode uses pcomplete rules, with the standard completion UI. | ||
| 724 | |||
| 727 | *** The `shell' command prompts for the shell path name if the default | 725 | *** The `shell' command prompts for the shell path name if the default |
| 728 | directory is a remote file name and neither the environment variable | 726 | directory is a remote file name and neither the environment variable |
| 729 | $ESHELL nor the variable `explicit-shell-file-name' is set. | 727 | $ESHELL nor the variable `explicit-shell-file-name' is set. |
| @@ -1108,6 +1106,11 @@ See the docstring of `display-buffer' for details. | |||
| 1108 | The behavior of `quit-window' has been changed in order to restore the | 1106 | The behavior of `quit-window' has been changed in order to restore the |
| 1109 | state before the last buffer display operation in that window. | 1107 | state before the last buffer display operation in that window. |
| 1110 | 1108 | ||
| 1109 | +++ | ||
| 1110 | *** The new option `frame-auto-hide-function' lets you choose between | ||
| 1111 | iconfying or deleting a frame when burying a buffer shown in a dedicated | ||
| 1112 | frame or quitting a window showing a buffer in a frame of its own. | ||
| 1113 | |||
| 1111 | ** Completion | 1114 | ** Completion |
| 1112 | 1115 | ||
| 1113 | *** New variable completion-extra-properties used to specify extra properties | 1116 | *** New variable completion-extra-properties used to specify extra properties |
| @@ -1128,6 +1131,13 @@ can specify various details of the data returned by `all-completions': | |||
| 1128 | - `display-sort-function' to specify how to sort entries in *Completions*. | 1131 | - `display-sort-function' to specify how to sort entries in *Completions*. |
| 1129 | - `cycle-sort-function' to specify how to sort entries when cycling. | 1132 | - `cycle-sort-function' to specify how to sort entries when cycling. |
| 1130 | 1133 | ||
| 1134 | *** minibuffer-local-filename-must-match-map is not used any more. | ||
| 1135 | Instead, the bindings in minibuffer-local-filename-completion-map are | ||
| 1136 | combined with minibuffer-local-must-match-map. | ||
| 1137 | |||
| 1138 | *** New variable `completing-read-function' allows overriding the | ||
| 1139 | behavior of `completing-read'. | ||
| 1140 | |||
| 1131 | ** `glyphless-char-display' can now distinguish between graphical and | 1141 | ** `glyphless-char-display' can now distinguish between graphical and |
| 1132 | text terminal display, via a char-table entry that is a cons cell. | 1142 | text terminal display, via a char-table entry that is a cons cell. |
| 1133 | 1143 | ||
diff --git a/leim/ChangeLog b/leim/ChangeLog index c6ee6d7bbbd..6130bf57800 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | * MISC-DIC/cangjie-table.b5, MISC-DIC/cangjie-table.cns, | 44 | * MISC-DIC/cangjie-table.b5, MISC-DIC/cangjie-table.cns, |
| 45 | * MISC-DIC/pinyin.map, MISC-DIC/ziranma.cin: Likewise. | 45 | * MISC-DIC/pinyin.map, MISC-DIC/ziranma.cin: Likewise. |
| 46 | 46 | ||
| 47 | * Makefile.in (TIT_BIG5): Renamed from TIT-BIG5. | 47 | * Makefile.in (TIT_BIG5): Rename from TIT-BIG5. |
| 48 | 48 | ||
| 49 | 2011-05-30 Oliver Scholz <epameinondas@gmx.de> | 49 | 2011-05-30 Oliver Scholz <epameinondas@gmx.de> |
| 50 | 50 | ||
| @@ -86,18 +86,18 @@ | |||
| 86 | POSIX does not allow "-" in Makefile variable names. | 86 | POSIX does not allow "-" in Makefile variable names. |
| 87 | Reported by Bruno Haible in | 87 | Reported by Bruno Haible in |
| 88 | <http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00990.html>. | 88 | <http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00990.html>. |
| 89 | * Makefile.in (BUILT_EMACS): Renamed from BUILT-EMACS. | 89 | * Makefile.in (BUILT_EMACS): Rename from BUILT-EMACS. |
| 90 | (TIT_GB): Renamed from TIT-GB. | 90 | (TIT_GB): Rename from TIT-GB. |
| 91 | (CHINESE_TIT): Renamed from CHINESE-TIT. | 91 | (CHINESE_TIT): Rename from CHINESE-TIT. |
| 92 | (NON_TIT_GB): Renamed from NON-TIT-GB. | 92 | (NON_TIT_GB): Rename from NON-TIT-GB. |
| 93 | (NON_TIT_BIG5): Renamed from NON-TIT-BIG5. | 93 | (NON_TIT_BIG5): Rename from NON-TIT-BIG5. |
| 94 | (CHINESE_NON_TIT): Renamed from CHINESE-NON-TIT. | 94 | (CHINESE_NON_TIT): Rename from CHINESE-NON-TIT. |
| 95 | (CHINESE_GB): Renamed from CHINESE-GB. | 95 | (CHINESE_GB): Rename from CHINESE-GB. |
| 96 | (CHINESE_BIG5): Renamed from CHINESE-BIG5. | 96 | (CHINESE_BIG5): Rename from CHINESE-BIG5. |
| 97 | (TIT_MISC): Renamed from TIT-MISC. | 97 | (TIT_MISC): Rename from TIT-MISC. |
| 98 | (NON_TIT_MISC): Renamed from NON-TIT-MISC. | 98 | (NON_TIT_MISC): Rename from NON-TIT-MISC. |
| 99 | (TIT_SOURCES): Renamed from TIT-SOURCES. | 99 | (TIT_SOURCES): Rename from TIT-SOURCES. |
| 100 | (MISC_SOURCES): Renamed from MISC-SOURCES. | 100 | (MISC_SOURCES): Rename from MISC-SOURCES. |
| 101 | 101 | ||
| 102 | 2011-01-08 Glenn Morris <rgm@gnu.org> | 102 | 2011-01-08 Glenn Morris <rgm@gnu.org> |
| 103 | 103 | ||
| @@ -418,8 +418,8 @@ | |||
| 418 | ("thai-kesmanee", "thai-pattachote"): Don't use | 418 | ("thai-kesmanee", "thai-pattachote"): Don't use |
| 419 | UPDATE-TRANSLATION-FUNCTION. | 419 | UPDATE-TRANSLATION-FUNCTION. |
| 420 | 420 | ||
| 421 | * quail/indian.el (quail-indian-preceding-char-position): Delete | 421 | * quail/indian.el (quail-indian-preceding-char-position): |
| 422 | function. | 422 | Delete function. |
| 423 | (quail-indian-update-preceding-char): Delete variable. | 423 | (quail-indian-update-preceding-char): Delete variable. |
| 424 | (quail-indian-update-translation): Delete function. | 424 | (quail-indian-update-translation): Delete function. |
| 425 | (quail-define-indian-trans-package): Don't call | 425 | (quail-define-indian-trans-package): Don't call |
| @@ -487,7 +487,7 @@ | |||
| 487 | ("german-alt-postfix", "icelandic-alt-postfix") | 487 | ("german-alt-postfix", "icelandic-alt-postfix") |
| 488 | ("norwegian-alt-postfix", "scandinavian-alt-postfix") | 488 | ("norwegian-alt-postfix", "scandinavian-alt-postfix") |
| 489 | ("spanish-alt-postfix", "swedish-alt-postfix"): | 489 | ("spanish-alt-postfix", "swedish-alt-postfix"): |
| 490 | Deleted; they were identical to the non-alt versions. | 490 | Delete; they were identical to the non-alt versions. |
| 491 | 491 | ||
| 492 | 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp> | 492 | 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp> |
| 493 | 493 | ||
| @@ -637,7 +637,7 @@ | |||
| 637 | 637 | ||
| 638 | 2005-11-03 Andreas Schwab <schwab@suse.de> | 638 | 2005-11-03 Andreas Schwab <schwab@suse.de> |
| 639 | 639 | ||
| 640 | * Makefile.in (GZIP_PROG): Renamed from GZIP. | 640 | * Makefile.in (GZIP_PROG): Rename from GZIP. |
| 641 | (install): Adjust. | 641 | (install): Adjust. |
| 642 | 642 | ||
| 643 | 2005-11-01 Romain Francoise <romain@orebokech.com> | 643 | 2005-11-01 Romain Francoise <romain@orebokech.com> |
| @@ -1274,8 +1274,8 @@ | |||
| 1274 | 1274 | ||
| 1275 | 2001-04-23 Gerd Moellmann <gerd@gnu.org> | 1275 | 2001-04-23 Gerd Moellmann <gerd@gnu.org> |
| 1276 | 1276 | ||
| 1277 | * quail/latin-ltx.el: Add more translations. From | 1277 | * quail/latin-ltx.el: Add more translations. |
| 1278 | jsbien@mimuw.edu.pl (Janusz S. Bień). | 1278 | From jsbien@mimuw.edu.pl (Janusz S. Bień). |
| 1279 | 1279 | ||
| 1280 | 2001-04-19 Eli Zaretskii <eliz@is.elta.co.il> | 1280 | 2001-04-19 Eli Zaretskii <eliz@is.elta.co.il> |
| 1281 | 1281 | ||
| @@ -1318,8 +1318,8 @@ | |||
| 1318 | 1318 | ||
| 1319 | 2001-04-02 Eli Zaretskii <eliz@is.elta.co.il> | 1319 | 2001-04-02 Eli Zaretskii <eliz@is.elta.co.il> |
| 1320 | 1320 | ||
| 1321 | * Makefile.in (KOREAN): Add ${srcdir}/quail/hanja3.elc. From | 1321 | * Makefile.in (KOREAN): Add ${srcdir}/quail/hanja3.elc. |
| 1322 | Kenichi Handa <handa@etl.go.jp>. | 1322 | From Kenichi Handa <handa@etl.go.jp>. |
| 1323 | 1323 | ||
| 1324 | * Makefile.in (.NOTPARALLEL, .NO_PARALLEL): Add ${MISC-DIC}. | 1324 | * Makefile.in (.NOTPARALLEL, .NO_PARALLEL): Add ${MISC-DIC}. |
| 1325 | 1325 | ||
| @@ -1372,8 +1372,8 @@ | |||
| 1372 | 1372 | ||
| 1373 | 2001-03-16 Kenichi Handa <handa@etl.go.jp> | 1373 | 2001-03-16 Kenichi Handa <handa@etl.go.jp> |
| 1374 | 1374 | ||
| 1375 | * quail/japanese.el (quail-japanese-transliteration-rules): New | 1375 | * quail/japanese.el (quail-japanese-transliteration-rules): |
| 1376 | variable. Use it to define these input methods: "japanese", | 1376 | New variable. Use it to define these input methods: "japanese", |
| 1377 | "japanese-hiragana", "japanese-katakana". | 1377 | "japanese-hiragana", "japanese-katakana". |
| 1378 | (quail-japanese-kana-state): Delete this variable. | 1378 | (quail-japanese-kana-state): Delete this variable. |
| 1379 | (quail-japanese-toggle-kana): Don't use quail-japanese-kana-state, | 1379 | (quail-japanese-toggle-kana): Don't use quail-japanese-kana-state, |
| @@ -1428,7 +1428,7 @@ | |||
| 1428 | 1428 | ||
| 1429 | 2001-01-28 Gerd Moellmann <gerd@gnu.org> | 1429 | 2001-01-28 Gerd Moellmann <gerd@gnu.org> |
| 1430 | 1430 | ||
| 1431 | * Makefile.in (extraclean): Added target so make doesn't die if | 1431 | * Makefile.in (extraclean): Add target so make doesn't die if |
| 1432 | one runs "make extraclean" at the top level. | 1432 | one runs "make extraclean" at the top level. |
| 1433 | 1433 | ||
| 1434 | 2001-01-06 Andrew Innes <andrewi@gnu.org> | 1434 | 2001-01-06 Andrew Innes <andrewi@gnu.org> |
| @@ -1478,7 +1478,7 @@ | |||
| 1478 | (NON-TIT-CNS, JAPANESE, KOREAN, THAI, VIETNAMESE, LAO, INDIAN) | 1478 | (NON-TIT-CNS, JAPANESE, KOREAN, THAI, VIETNAMESE, LAO, INDIAN) |
| 1479 | (TIBETAN, LATIN, SLAVIC, GREEK, RUSSIAN, MISC): Rename all .el | 1479 | (TIBETAN, LATIN, SLAVIC, GREEK, RUSSIAN, MISC): Rename all .el |
| 1480 | files to .elc. | 1480 | files to .elc. |
| 1481 | ($(TIT)): Adjusted for the above change. | 1481 | ($(TIT)): Adjust for the above change. |
| 1482 | (clean mostlyclean): Likewise. | 1482 | (clean mostlyclean): Likewise. |
| 1483 | (.el.elc): New target. | 1483 | (.el.elc): New target. |
| 1484 | 1484 | ||
| @@ -1488,7 +1488,7 @@ | |||
| 1488 | (NON-TIT-CNS, JAPANESE, KOREAN, THAI, VIETNAMESE, LAO, INDIAN) | 1488 | (NON-TIT-CNS, JAPANESE, KOREAN, THAI, VIETNAMESE, LAO, INDIAN) |
| 1489 | (TIBETAN, LATIN, SLAVIC, GREEK, RUSSIAN, MISC): Rename all .el | 1489 | (TIBETAN, LATIN, SLAVIC, GREEK, RUSSIAN, MISC): Rename all .el |
| 1490 | files to .elc. | 1490 | files to .elc. |
| 1491 | ($(TIT)): Adjusted for the above change. | 1491 | ($(TIT)): Adjust for the above change. |
| 1492 | (clean mostlyclean): Likewise. | 1492 | (clean mostlyclean): Likewise. |
| 1493 | (.el.elc): New target. | 1493 | (.el.elc): New target. |
| 1494 | 1494 | ||
| @@ -1552,7 +1552,7 @@ | |||
| 1552 | ("japanese-hankaku-kana", "japanese-hiragana") | 1552 | ("japanese-hankaku-kana", "japanese-hiragana") |
| 1553 | ("japanese-katakana"): Docstring modified. | 1553 | ("japanese-katakana"): Docstring modified. |
| 1554 | 1554 | ||
| 1555 | * quail/czech.el ("czech-qwerty"): Changed to show keyboard layout | 1555 | * quail/czech.el ("czech-qwerty"): Change to show keyboard layout |
| 1556 | on describe-input-method. | 1556 | on describe-input-method. |
| 1557 | ("czech-prog-1", "czech-prog-2", "czech-prog-3"): Likewise. | 1557 | ("czech-prog-1", "czech-prog-2", "czech-prog-3"): Likewise. |
| 1558 | 1558 | ||
| @@ -1660,12 +1660,12 @@ | |||
| 1660 | 1660 | ||
| 1661 | 1999-09-19 Ken'ichi Handa <handa@gnu.org> | 1661 | 1999-09-19 Ken'ichi Handa <handa@gnu.org> |
| 1662 | 1662 | ||
| 1663 | * quail/latin-alt.el ("turkish-latin-3-alt-postfix"): Renamed from | 1663 | * quail/latin-alt.el ("turkish-latin-3-alt-postfix"): Rename from |
| 1664 | turkish-postfix. | 1664 | turkish-postfix. |
| 1665 | ("turkish-postfix"): New Turkish input method which inserts | 1665 | ("turkish-postfix"): New Turkish input method which inserts |
| 1666 | Latin-5 characters. | 1666 | Latin-5 characters. |
| 1667 | 1667 | ||
| 1668 | * quail/latin-alt.el ("turkish-latin-3-alt-postfix"): Renamed from | 1668 | * quail/latin-alt.el ("turkish-latin-3-alt-postfix"): Rename from |
| 1669 | turkish-alt-postfix. | 1669 | turkish-alt-postfix. |
| 1670 | ("turkish-alt-postfix"): New Turkish input method which inserts | 1670 | ("turkish-alt-postfix"): New Turkish input method which inserts |
| 1671 | Latin-5 characters. | 1671 | Latin-5 characters. |
| @@ -1715,7 +1715,7 @@ | |||
| 1715 | 1998-12-15 Kenichi Handa <handa@etl.go.jp> | 1715 | 1998-12-15 Kenichi Handa <handa@etl.go.jp> |
| 1716 | 1716 | ||
| 1717 | * quail/devanagari.el (quail-devanagari-compose-characters): | 1717 | * quail/devanagari.el (quail-devanagari-compose-characters): |
| 1718 | Adjusted for the change of input method handling. | 1718 | Adjust for the change of input method handling. |
| 1719 | (quail-devanagari-hindi-compose-characters): Likewise. | 1719 | (quail-devanagari-hindi-compose-characters): Likewise. |
| 1720 | 1720 | ||
| 1721 | 1998-10-15 Kenichi Handa <handa@etl.go.jp> | 1721 | 1998-10-15 Kenichi Handa <handa@etl.go.jp> |
| @@ -1747,16 +1747,16 @@ | |||
| 1747 | 1998-09-25 Kenichi Handa <handa@etl.go.jp> | 1747 | 1998-09-25 Kenichi Handa <handa@etl.go.jp> |
| 1748 | 1748 | ||
| 1749 | * quail/japanese.el (quail-japanese-hankaku-update-translation): | 1749 | * quail/japanese.el (quail-japanese-hankaku-update-translation): |
| 1750 | Adjusted for the change of input method handling. | 1750 | Adjust for the change of input method handling. |
| 1751 | 1751 | ||
| 1752 | 1998-09-11 Kenichi HANDA <handa@etl.go.jp> | 1752 | 1998-09-11 Kenichi HANDA <handa@etl.go.jp> |
| 1753 | 1753 | ||
| 1754 | * quail/japanese.el (quail-japanese-katakana-update-translation): | 1754 | * quail/japanese.el (quail-japanese-katakana-update-translation): |
| 1755 | Adjusted for the change of input method handling. | 1755 | Adjust for the change of input method handling. |
| 1756 | 1756 | ||
| 1757 | 1998-08-31 Kenichi Handa <handa@etl.go.jp> | 1757 | 1998-08-31 Kenichi Handa <handa@etl.go.jp> |
| 1758 | 1758 | ||
| 1759 | * quail/tibetan.el (quail-tibetan-input-wylie): Adjusted for the | 1759 | * quail/tibetan.el (quail-tibetan-input-wylie): Adjust for the |
| 1760 | change of input method handling. | 1760 | change of input method handling. |
| 1761 | (quail-tibetan-input-tibkey): Likewise. | 1761 | (quail-tibetan-input-tibkey): Likewise. |
| 1762 | 1762 | ||
| @@ -1780,7 +1780,7 @@ | |||
| 1780 | 1998-08-06 Kenichi Handa <handa@etl.go.jp> | 1780 | 1998-08-06 Kenichi Handa <handa@etl.go.jp> |
| 1781 | 1781 | ||
| 1782 | * quail/japanese.el (quail-japanese-use-double-n): New variable. | 1782 | * quail/japanese.el (quail-japanese-use-double-n): New variable. |
| 1783 | (quail-japanese-update-translation): Adjusted for the change of | 1783 | (quail-japanese-update-translation): Adjust for the change of |
| 1784 | quail-update-translation. Now this function should return | 1784 | quail-update-translation. Now this function should return |
| 1785 | CONTROL-FLAG. | 1785 | CONTROL-FLAG. |
| 1786 | (quail-japanese-toggle-kana): Update quail-conversion-str. | 1786 | (quail-japanese-toggle-kana): Update quail-conversion-str. |
| @@ -1790,8 +1790,8 @@ | |||
| 1790 | 1790 | ||
| 1791 | 1998-07-24 Kenichi Handa <handa@etl.go.jp> | 1791 | 1998-07-24 Kenichi Handa <handa@etl.go.jp> |
| 1792 | 1792 | ||
| 1793 | * quail/japanese.el (quail-japanese-kanji-kkc): Set | 1793 | * quail/japanese.el (quail-japanese-kanji-kkc): |
| 1794 | quail-translation to nil after calling kkc-region so that | 1794 | Set quail-translation to nil after calling kkc-region so that |
| 1795 | translation mode is restarted correctly. | 1795 | translation mode is restarted correctly. |
| 1796 | 1796 | ||
| 1797 | 1998-07-21 Kenichi Handa <handa@etl.go.jp> | 1797 | 1998-07-21 Kenichi Handa <handa@etl.go.jp> |
| @@ -1802,15 +1802,15 @@ | |||
| 1802 | 1802 | ||
| 1803 | 1998-07-19 Kenichi Handa <handa@etl.go.jp> | 1803 | 1998-07-19 Kenichi Handa <handa@etl.go.jp> |
| 1804 | 1804 | ||
| 1805 | * quail/japanese.el (quail-japanese-update-translation): Handle | 1805 | * quail/japanese.el (quail-japanese-update-translation): |
| 1806 | a key which should fix the current translation and start a new | 1806 | Handle a key which should fix the current translation and start a new |
| 1807 | translation correctly. | 1807 | translation correctly. |
| 1808 | (quail-japanese-toggle-kana): Set quail-translating to nil. Don't | 1808 | (quail-japanese-toggle-kana): Set quail-translating to nil. |
| 1809 | change point. | 1809 | Don't change point. |
| 1810 | 1810 | ||
| 1811 | 1998-07-15 Kenichi Handa <handa@etl.go.jp> | 1811 | 1998-07-15 Kenichi Handa <handa@etl.go.jp> |
| 1812 | 1812 | ||
| 1813 | * quail/japanese.el (quail-japanese-kanji-kkc): Adjusted for the | 1813 | * quail/japanese.el (quail-japanese-kanji-kkc): Adjust for the |
| 1814 | change of quail.el. | 1814 | change of quail.el. |
| 1815 | (quail-japanese-switch-package): Likewise. | 1815 | (quail-japanese-switch-package): Likewise. |
| 1816 | 1816 | ||
| @@ -1895,17 +1895,17 @@ | |||
| 1895 | 1895 | ||
| 1896 | * quail/symbol-ksc.el: Title string of the input method | 1896 | * quail/symbol-ksc.el: Title string of the input method |
| 1897 | "korean-symbol" changed. Require 'korea-util. | 1897 | "korean-symbol" changed. Require 'korea-util. |
| 1898 | (quail-hangul-switch-back): Deleted. | 1898 | (quail-hangul-switch-back): Delete. |
| 1899 | 1899 | ||
| 1900 | * quail/hangul3.el: Require 'korea-util. | 1900 | * quail/hangul3.el: Require 'korea-util. |
| 1901 | (quail-hangul-switch-to-symbol-ksc): Deleted. | 1901 | (quail-hangul-switch-to-symbol-ksc): Delete. |
| 1902 | 1902 | ||
| 1903 | * quail/hanja.el: Require 'korea-util. Title string of the input | 1903 | * quail/hanja.el: Require 'korea-util. Title string of the input |
| 1904 | method "korean-hanja" changed. | 1904 | method "korean-hanja" changed. |
| 1905 | (quail-hanja-switch-to-symbol-ksc): Deleted. | 1905 | (quail-hanja-switch-to-symbol-ksc): Delete. |
| 1906 | 1906 | ||
| 1907 | * quail/hangul.el: Require 'korea-util. | 1907 | * quail/hangul.el: Require 'korea-util. |
| 1908 | (quail-hangul-switch-to-symbol-ksc): Deleted. | 1908 | (quail-hangul-switch-to-symbol-ksc): Delete. |
| 1909 | 1909 | ||
| 1910 | 1997-10-23 Kenichi Handa <handa@etl.go.jp> | 1910 | 1997-10-23 Kenichi Handa <handa@etl.go.jp> |
| 1911 | 1911 | ||
| @@ -1951,18 +1951,18 @@ | |||
| 1951 | 1951 | ||
| 1952 | 1997-09-10 Kenichi Handa <handa@etl.go.jp> | 1952 | 1997-09-10 Kenichi Handa <handa@etl.go.jp> |
| 1953 | 1953 | ||
| 1954 | * quail/ethiopic.el: Don't bind keys in quail-mode-map. The | 1954 | * quail/ethiopic.el: Don't bind keys in quail-mode-map. |
| 1955 | function added to quail-mode-hook turn ethio-mode on only when | 1955 | The function added to quail-mode-hook turn ethio-mode on only when |
| 1956 | input method "ethiopic" is begin used. | 1956 | input method "ethiopic" is begin used. |
| 1957 | (ethio-prefer-ascii-space): Moved to lisp/language/ethio-util.el. | 1957 | (ethio-prefer-ascii-space): Move to lisp/language/ethio-util.el. |
| 1958 | (ethio-toggle-space): Likewise. | 1958 | (ethio-toggle-space): Likewise. |
| 1959 | (ethio-insert-space): Likewise. | 1959 | (ethio-insert-space): Likewise. |
| 1960 | (ethio-insert-ethio-space): Likewise. | 1960 | (ethio-insert-ethio-space): Likewise. |
| 1961 | (ethio-prefer-ascii-punctuation): Likewise. | 1961 | (ethio-prefer-ascii-punctuation): Likewise. |
| 1962 | (ethio-toggle-punctuation): Likewise. | 1962 | (ethio-toggle-punctuation): Likewise. |
| 1963 | (ethio-gemination): Likewise. | 1963 | (ethio-gemination): Likewise. |
| 1964 | ("ethiopic"): Doc-string of this Quail package modified. Bind | 1964 | ("ethiopic"): Doc-string of this Quail package modified. |
| 1965 | function keys for TRANSLATION-KEYMAP to | 1965 | Bind function keys for TRANSLATION-KEYMAP to |
| 1966 | quail-execute-non-quail-command. | 1966 | quail-execute-non-quail-command. |
| 1967 | 1967 | ||
| 1968 | 1997-09-10 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | 1968 | 1997-09-10 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> |
| @@ -1972,8 +1972,8 @@ | |||
| 1972 | 1972 | ||
| 1973 | 1997-09-03 Ken'ichi Handa <handa@psilocin.gnu.ai.mit.edu> | 1973 | 1997-09-03 Ken'ichi Handa <handa@psilocin.gnu.ai.mit.edu> |
| 1974 | 1974 | ||
| 1975 | * Makefile.in (install): Do not copy leim-list.el twice. Copy | 1975 | * Makefile.in (install): Do not copy leim-list.el twice. |
| 1976 | `skk' subdirectory too. | 1976 | Copy `skk' subdirectory too. |
| 1977 | 1977 | ||
| 1978 | 1997-09-03 Kenichi Handa <handa@etl.go.jp> | 1978 | 1997-09-03 Kenichi Handa <handa@etl.go.jp> |
| 1979 | 1979 | ||
| @@ -2028,8 +2028,8 @@ | |||
| 2028 | 2028 | ||
| 2029 | 1997-08-23 Kenichi Handa <handa@etl.go.jp> | 2029 | 1997-08-23 Kenichi Handa <handa@etl.go.jp> |
| 2030 | 2030 | ||
| 2031 | * quail/devanagari.el (quail-devanagari-compose-characters): Fix | 2031 | * quail/devanagari.el (quail-devanagari-compose-characters): |
| 2032 | previous change. | 2032 | Fix previous change. |
| 2033 | (quail-devanagari-hindi-compose-characters): Fix previous change. | 2033 | (quail-devanagari-hindi-compose-characters): Fix previous change. |
| 2034 | 2034 | ||
| 2035 | * quail/japanese.el (quail-japanese-kkc-mode-exit): Fix previous | 2035 | * quail/japanese.el (quail-japanese-kkc-mode-exit): Fix previous |
| @@ -2054,8 +2054,8 @@ | |||
| 2054 | (CHINESE-CNS): File name change: tsangchi-cns.el -> tsang-cns.el. | 2054 | (CHINESE-CNS): File name change: tsangchi-cns.el -> tsang-cns.el. |
| 2055 | (leim-list.el): Delete old files not contained in ${WORLD}. | 2055 | (leim-list.el): Delete old files not contained in ${WORLD}. |
| 2056 | 2056 | ||
| 2057 | * quail/japanese.el (quail-japanese-kkc-mode-exit): Run | 2057 | * quail/japanese.el (quail-japanese-kkc-mode-exit): |
| 2058 | input-method-after-insert-chunk-hook. | 2058 | Run input-method-after-insert-chunk-hook. |
| 2059 | 2059 | ||
| 2060 | * quail/thai.el (thai-keyboard-mapping-alist): Some entry corrected. | 2060 | * quail/thai.el (thai-keyboard-mapping-alist): Some entry corrected. |
| 2061 | 2061 | ||
| @@ -2075,17 +2075,17 @@ | |||
| 2075 | 2075 | ||
| 2076 | * quail/thai.el (thai-consonant-input): Typo fixed. | 2076 | * quail/thai.el (thai-consonant-input): Typo fixed. |
| 2077 | 2077 | ||
| 2078 | * quail/devanagari.el (quail-devanagari-compose-characters): Do | 2078 | * quail/devanagari.el (quail-devanagari-compose-characters): |
| 2079 | not call throw. | 2079 | Do not call throw. |
| 2080 | (quail-devanagari-hindi-compose-characters): Likewise. | 2080 | (quail-devanagari-hindi-compose-characters): Likewise. |
| 2081 | 2081 | ||
| 2082 | * quail/hangul.el (quail-hangul-switch-to-symbol-ksc): Call | 2082 | * quail/hangul.el (quail-hangul-switch-to-symbol-ksc): |
| 2083 | activate-input-method instead of select-input-method. | 2083 | Call activate-input-method instead of select-input-method. |
| 2084 | 2084 | ||
| 2085 | * quail/hangul3.el (quail-hangul-switch-to-symbol-ksc): Likewise. | 2085 | * quail/hangul3.el (quail-hangul-switch-to-symbol-ksc): Likewise. |
| 2086 | 2086 | ||
| 2087 | * quail/symbol-ksc.el (quail-hangul-switch-back): Likewise. Use | 2087 | * quail/symbol-ksc.el (quail-hangul-switch-back): Likewise. |
| 2088 | input-method-history instead of previous-input-method. | 2088 | Use input-method-history instead of previous-input-method. |
| 2089 | 2089 | ||
| 2090 | 1997-08-16 Valery Alexeev <valery@domovoy.math.uga.edu> | 2090 | 1997-08-16 Valery Alexeev <valery@domovoy.math.uga.edu> |
| 2091 | 2091 | ||
diff --git a/lib/signal.in.h b/lib/signal.in.h index b0e192feeae..e18e0b29832 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h | |||
| @@ -178,6 +178,10 @@ _GL_WARN_ON_USE (raise, "raise can crash on native Windows - " | |||
| 178 | #if @GNULIB_SIGPROCMASK@ | 178 | #if @GNULIB_SIGPROCMASK@ |
| 179 | # if !@HAVE_POSIX_SIGNALBLOCKING@ | 179 | # if !@HAVE_POSIX_SIGNALBLOCKING@ |
| 180 | 180 | ||
| 181 | # ifndef GNULIB_defined_signal_blocking | ||
| 182 | # define GNULIB_defined_signal_blocking 1 | ||
| 183 | # endif | ||
| 184 | |||
| 181 | /* Maximum signal number + 1. */ | 185 | /* Maximum signal number + 1. */ |
| 182 | # ifndef NSIG | 186 | # ifndef NSIG |
| 183 | # define NSIG 32 | 187 | # define NSIG 32 |
| @@ -303,18 +307,10 @@ _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, | |||
| 303 | # endif | 307 | # endif |
| 304 | _GL_CXXALIASWARN (signal); | 308 | _GL_CXXALIASWARN (signal); |
| 305 | 309 | ||
| 306 | /* Raise signal SIG. */ | ||
| 307 | # if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE | 310 | # if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE |
| 308 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 311 | /* Raise signal SIGPIPE. */ |
| 309 | # undef raise | 312 | _GL_EXTERN_C int _gl_raise_SIGPIPE (void); |
| 310 | # define raise rpl_raise | ||
| 311 | # endif | ||
| 312 | _GL_FUNCDECL_RPL (raise, int, (int sig)); | ||
| 313 | _GL_CXXALIAS_RPL (raise, int, (int sig)); | ||
| 314 | # else | ||
| 315 | _GL_CXXALIAS_SYS (raise, int, (int sig)); | ||
| 316 | # endif | 313 | # endif |
| 317 | _GL_CXXALIASWARN (raise); | ||
| 318 | 314 | ||
| 319 | #elif defined GNULIB_POSIXCHECK | 315 | #elif defined GNULIB_POSIXCHECK |
| 320 | # undef sigaddset | 316 | # undef sigaddset |
diff --git a/lib/sigprocmask.c b/lib/sigprocmask.c index 6ccac5a8343..e75c7576cdf 100644 --- a/lib/sigprocmask.c +++ b/lib/sigprocmask.c | |||
| @@ -330,27 +330,19 @@ rpl_signal (int sig, handler_t handler) | |||
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | #if GNULIB_defined_SIGPIPE | 332 | #if GNULIB_defined_SIGPIPE |
| 333 | /* Raise the signal SIG. */ | 333 | /* Raise the signal SIGPIPE. */ |
| 334 | int | 334 | int |
| 335 | rpl_raise (int sig) | 335 | _gl_raise_SIGPIPE (void) |
| 336 | # undef raise | ||
| 337 | { | 336 | { |
| 338 | switch (sig) | 337 | if (blocked_set & (1U << SIGPIPE)) |
| 338 | pending_array[SIGPIPE] = 1; | ||
| 339 | else | ||
| 339 | { | 340 | { |
| 340 | case SIGPIPE: | 341 | handler_t handler = SIGPIPE_handler; |
| 341 | if (blocked_set & (1U << sig)) | 342 | if (handler == SIG_DFL) |
| 342 | pending_array[sig] = 1; | 343 | exit (128 + SIGPIPE); |
| 343 | else | 344 | else if (handler != SIG_IGN) |
| 344 | { | 345 | (*handler) (SIGPIPE); |
| 345 | handler_t handler = SIGPIPE_handler; | ||
| 346 | if (handler == SIG_DFL) | ||
| 347 | exit (128 + SIGPIPE); | ||
| 348 | else if (handler != SIG_IGN) | ||
| 349 | (*handler) (sig); | ||
| 350 | } | ||
| 351 | return 0; | ||
| 352 | default: /* System defined signal */ | ||
| 353 | return raise (sig); | ||
| 354 | } | 346 | } |
| 355 | } | 347 | } |
| 356 | #endif | 348 | #endif |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efe1d4b4a42..103d7b25518 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,149 @@ | |||
| 1 | 2011-10-10 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * window.el (special-display-buffer-names) | ||
| 4 | (special-display-regexps): Remove some remnants of earlier | ||
| 5 | changes from doc-strings. | ||
| 6 | |||
| 7 | 2011-10-09 Martin Rudalics <rudalics@gmx.at> | ||
| 8 | |||
| 9 | * window.el (frame-auto-hide-function): Add version tag. | ||
| 10 | (Bug#9699) | ||
| 11 | |||
| 12 | 2011-10-09 Michael Albinus <michael.albinus@gmx.de> | ||
| 13 | |||
| 14 | * net/tramp.el (tramp-file-name-handler): Add 'debug to the error | ||
| 15 | condition. | ||
| 16 | |||
| 17 | 2011-10-09 Leo Liu <sdl.web@gmail.com> | ||
| 18 | |||
| 19 | * mail/smtpmail.el (smtpmail-send-data): Add a missing space. | ||
| 20 | (Bug#9701) | ||
| 21 | |||
| 22 | 2011-10-08 Glenn Morris <rgm@gnu.org> | ||
| 23 | |||
| 24 | * progmodes/f90.el (f90-calculate-indent): Give preprocessor lines | ||
| 25 | before the first code statement zero indent. (Bug#9690) | ||
| 26 | |||
| 27 | 2011-10-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 28 | |||
| 29 | * simple.el (count-words-region): Always count in the region. | ||
| 30 | Report the number of lines and characters too. | ||
| 31 | (count-words): New command, which counts in the buffer if the | ||
| 32 | region is inactive, as count-words-region used to. | ||
| 33 | (count-words--message): New function. Handle plurals. | ||
| 34 | (count-lines-region): Make it an alias for count-words-region. | ||
| 35 | |||
| 36 | * bindings.el (esc-map): Replace count-lines-region with | ||
| 37 | count-words-region. | ||
| 38 | |||
| 39 | 2011-10-08 Martin Rudalics <rudalics@gmx.at> | ||
| 40 | |||
| 41 | * window.el (window--delete): Delete dedicated frame | ||
| 42 | unconditionally when argument KILL is non-nil. (Bug#9699) | ||
| 43 | (switch-to-buffer): Fix doc-string typo. | ||
| 44 | |||
| 45 | 2011-10-08 Thierry Volpiatto <thierry.volpiatto@gmail.com> | ||
| 46 | |||
| 47 | * lisp/eshell/eshell.el (eshell-command): Avoid using hooks. | ||
| 48 | |||
| 49 | 2011-10-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 50 | |||
| 51 | * bindings.el ([M-left],[M-right]): Bind to left-word and | ||
| 52 | right-word respectively. | ||
| 53 | |||
| 54 | 2011-10-07 Glenn Morris <rgm@gnu.org> | ||
| 55 | |||
| 56 | * cus-start.el (debug-on-quit): Fix custom type. | ||
| 57 | |||
| 58 | 2011-10-06 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 59 | |||
| 60 | * subr.el (define-key-after): Clarify that the function is not | ||
| 61 | useful for non-menu keymaps. | ||
| 62 | |||
| 63 | * progmodes/gdb-mi.el (gdb): Fix typo in doc string. | ||
| 64 | |||
| 65 | 2011-10-06 Thierry Volpiatto <thierry.volpiatto@gmail.com> | ||
| 66 | |||
| 67 | * eshell/eshell.el (eshell-command): Enable `eshell-mode' only | ||
| 68 | in current minibuffer (Fix bug with recursive minibuffers). | ||
| 69 | |||
| 70 | 2011-10-06 Chong Yidong <cyd@stupidchicken.com> | ||
| 71 | |||
| 72 | * progmodes/gdb-mi.el (gdb): Doc fix. | ||
| 73 | |||
| 74 | 2011-10-05 Martin Rudalics <rudalics@gmx.at> | ||
| 75 | |||
| 76 | * window.el (frame-auto-hide-function): New option replacing | ||
| 77 | frame-auto-delete. Suggested by Stefan Monnier. | ||
| 78 | (window--delete): Call frame-auto-hide-function instead of | ||
| 79 | investigating frame-auto-delete. | ||
| 80 | (window-point-1, set-window-point-1): New functions. | ||
| 81 | (window-in-direction, record-window-buffer, window-state-get-1) | ||
| 82 | (display-buffer-record-window): Use window-point-1 instead of | ||
| 83 | window-point. | ||
| 84 | (set-window-buffer-start-and-point): Use set-window-point-1. | ||
| 85 | |||
| 86 | 2011-10-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 87 | |||
| 88 | * emacs-lisp/edebug.el: Heed checkdoc recommendations. | ||
| 89 | |||
| 90 | 2011-10-05 Glenn Morris <rgm@gnu.org> | ||
| 91 | |||
| 92 | * progmodes/perl-mode.el (perl-electric-terminator): Doc fix. | ||
| 93 | (perl-calculate-indent): Suppress scan errors. (Bug#2205) | ||
| 94 | |||
| 95 | 2011-10-05 Leo Liu <sdl.web@gmail.com> | ||
| 96 | |||
| 97 | * subr.el (read-char-choice): Fix argument to buffer-live-p which | ||
| 98 | works with buffer object. | ||
| 99 | |||
| 100 | 2011-10-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 101 | |||
| 102 | * mpc.el (mpc-tool-bar-map): Add labels. | ||
| 103 | |||
| 104 | 2011-10-04 Glenn Morris <rgm@gnu.org> | ||
| 105 | |||
| 106 | * calendar/holidays.el (calendar-check-holidays): Doc fix. | ||
| 107 | |||
| 108 | 2011-10-04 Martin Rudalics <rudalics@gmx.at> | ||
| 109 | |||
| 110 | * window.el (window--delete): New function. | ||
| 111 | (frame-auto-delete): Resuscitate option. | ||
| 112 | (bury-buffer, replace-buffer-in-windows) | ||
| 113 | (quit-window): Rewrite using window--delete. | ||
| 114 | (display-buffer-pop-up-frame, display-buffer-pop-up-window): | ||
| 115 | Pass display-buffer-mark-dedicated to window--display-buffer-2 | ||
| 116 | (Bug#9639). | ||
| 117 | |||
| 118 | 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 119 | |||
| 120 | * pcmpl-unix.el (pcomplete/scp): Don't assume pcomplete-all-entries | ||
| 121 | returns a list (bug#9554). Add remote file name completion. | ||
| 122 | * comint.el (comint--table-subvert): Curry and get quote&unquote | ||
| 123 | functions as arguments. | ||
| 124 | (comint--complete-file-name-data): Adjust call accordingly. | ||
| 125 | * pcomplete.el (pcomplete--table-subvert): Remove. | ||
| 126 | (pcomplete-completions-at-point): Use comint--table-subvert instead. | ||
| 127 | |||
| 128 | * minibuffer.el (completion-table-case-fold): Use currying. | ||
| 129 | (completion--styles-type, completion--cycling-threshold-type): | ||
| 130 | New constants. | ||
| 131 | (completion-styles, completion-category-overrides) | ||
| 132 | (completion-cycle-threshold): Use them. | ||
| 133 | * pcomplete.el (pcomplete-completions-at-point): Adjust call to | ||
| 134 | completion-table-case-fold. | ||
| 135 | |||
| 136 | 2011-10-03 Stephen Berman <stephen.berman@gmx.net> | ||
| 137 | |||
| 138 | * minibuffer.el (completion-category-overrides): Fix type of styles | ||
| 139 | and add more user friendly tags (bug#9660). | ||
| 140 | |||
| 141 | 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 142 | |||
| 143 | * international/mule-cmds.el: Fix abuses of apply-partially (bug#9661). | ||
| 144 | (mule-input-method-string): New widget. | ||
| 145 | (default-input-method, language-info-custom-alist): Use it. | ||
| 146 | |||
| 1 | 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca> | 147 | 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 148 | ||
| 3 | * pcomplete.el: Require comint. | 149 | * pcomplete.el: Require comint. |
| @@ -12,8 +158,8 @@ | |||
| 12 | * pcmpl-gnu.el (pcmpl-gnu-with-file-buffer): New macro (bug#9643). | 158 | * pcmpl-gnu.el (pcmpl-gnu-with-file-buffer): New macro (bug#9643). |
| 13 | (pcmpl-gnu-tar-buffer): Remove. | 159 | (pcmpl-gnu-tar-buffer): Remove. |
| 14 | (pcmpl-gnu-with-file-buffer): Use it to avoid leaving the tar's buffer | 160 | (pcmpl-gnu-with-file-buffer): Use it to avoid leaving the tar's buffer |
| 15 | avoid. Make sure pcomplete-suffix-list is only changed temporarily. | 161 | around. Make sure pcomplete-suffix-list is only changed temporarily. |
| 16 | Don't look inside the tar's file is it's too large. | 162 | Don't look inside the tar's file if it's too large. |
| 17 | 163 | ||
| 18 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> | 164 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> |
| 19 | 165 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index 57bfeb60f82..1a10d117987 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -773,7 +773,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 773 | (define-key ctl-x-map "\C-o" 'delete-blank-lines) | 773 | (define-key ctl-x-map "\C-o" 'delete-blank-lines) |
| 774 | (define-key esc-map " " 'just-one-space) | 774 | (define-key esc-map " " 'just-one-space) |
| 775 | (define-key esc-map "z" 'zap-to-char) | 775 | (define-key esc-map "z" 'zap-to-char) |
| 776 | (define-key esc-map "=" 'count-lines-region) | 776 | (define-key esc-map "=" 'count-words-region) |
| 777 | (define-key ctl-x-map "=" 'what-cursor-position) | 777 | (define-key ctl-x-map "=" 'what-cursor-position) |
| 778 | (define-key esc-map ":" 'eval-expression) | 778 | (define-key esc-map ":" 'eval-expression) |
| 779 | ;; Define ESC ESC : like ESC : for people who type ESC ESC out of habit. | 779 | ;; Define ESC ESC : like ESC : for people who type ESC ESC out of habit. |
| @@ -1103,9 +1103,9 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 1103 | "Keymap for characters following C-c.") | 1103 | "Keymap for characters following C-c.") |
| 1104 | (define-key global-map "\C-c" 'mode-specific-command-prefix) | 1104 | (define-key global-map "\C-c" 'mode-specific-command-prefix) |
| 1105 | 1105 | ||
| 1106 | (global-set-key [M-right] 'forward-word) | 1106 | (global-set-key [M-right] 'right-word) |
| 1107 | (define-key esc-map [right] 'forward-word) | 1107 | (define-key esc-map [right] 'forward-word) |
| 1108 | (global-set-key [M-left] 'backward-word) | 1108 | (global-set-key [M-left] 'left-word) |
| 1109 | (define-key esc-map [left] 'backward-word) | 1109 | (define-key esc-map [left] 'backward-word) |
| 1110 | ;; ilya@math.ohio-state.edu says these bindings are standard on PC editors. | 1110 | ;; ilya@math.ohio-state.edu says these bindings are standard on PC editors. |
| 1111 | (global-set-key [C-right] 'right-word) | 1111 | (global-set-key [C-right] 'right-word) |
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 695f9b92712..3ba1078f62d 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el | |||
| @@ -632,8 +632,9 @@ The optional LABEL is used to label the buffer created." | |||
| 632 | ;;;###diary-autoload | 632 | ;;;###diary-autoload |
| 633 | (defun calendar-check-holidays (date) | 633 | (defun calendar-check-holidays (date) |
| 634 | "Check the list of holidays for any that occur on DATE. | 634 | "Check the list of holidays for any that occur on DATE. |
| 635 | The value returned is a list of strings of relevant holiday descriptions. | 635 | DATE is a list (month day year). This function considers the |
| 636 | The holidays are those in the list `calendar-holidays'." | 636 | holidays from the list `calendar-holidays', and returns a list of |
| 637 | strings describing those holidays that apply on DATE." | ||
| 637 | (let ((displayed-month (calendar-extract-month date)) | 638 | (let ((displayed-month (calendar-extract-month date)) |
| 638 | (displayed-year (calendar-extract-year date)) | 639 | (displayed-year (calendar-extract-year date)) |
| 639 | holiday-list) | 640 | holiday-list) |
diff --git a/lisp/comint.el b/lisp/comint.el index 59feab82e44..52580db6186 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -3040,8 +3040,9 @@ Returns t if successful." | |||
| 3040 | (comint--complete-file-name-data))) | 3040 | (comint--complete-file-name-data))) |
| 3041 | 3041 | ||
| 3042 | ;; FIXME: comint--common-suffix, comint--common-quoted-suffix, and | 3042 | ;; FIXME: comint--common-suffix, comint--common-quoted-suffix, and |
| 3043 | ;; comint--table-subvert copied from pcomplete. And they don't fully solve | 3043 | ;; comint--table-subvert don't fully solve the problem, since |
| 3044 | ;; the problem, since selecting a file from *Completions* won't quote it. | 3044 | ;; selecting a file from *Completions* won't quote it, among several |
| 3045 | ;; other problems. | ||
| 3045 | 3046 | ||
| 3046 | (defun comint--common-suffix (s1 s2) | 3047 | (defun comint--common-suffix (s1 s2) |
| 3047 | (assert (not (or (string-match "\n" s1) (string-match "\n" s2)))) | 3048 | (assert (not (or (string-match "\n" s1) (string-match "\n" s2)))) |
| @@ -3076,43 +3077,45 @@ SS1 = (unquote SS2)." | |||
| 3076 | (cons (substring s1 0 (- (length s1) cs)) | 3077 | (cons (substring s1 0 (- (length s1) cs)) |
| 3077 | (substring s2 0 (- (length s2) cs)))))) | 3078 | (substring s2 0 (- (length s2) cs)))))) |
| 3078 | 3079 | ||
| 3079 | (defun comint--table-subvert (table s1 s2 string pred action) | 3080 | (defun comint--table-subvert (table s1 s2 &optional quote-fun unquote-fun) |
| 3080 | "Completion table that replaces the prefix S1 with S2 in STRING. | 3081 | "Completion table that replaces the prefix S1 with S2 in STRING. |
| 3081 | When TABLE, S1 and S2 are provided by `apply-partially', the result | 3082 | When TABLE, S1 and S2 are provided by `apply-partially', the result |
| 3082 | is a completion table which completes strings of the form (concat S1 S) | 3083 | is a completion table which completes strings of the form (concat S1 S) |
| 3083 | in the same way as TABLE completes strings of the form (concat S2 S)." | 3084 | in the same way as TABLE completes strings of the form (concat S2 S)." |
| 3084 | (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil | 3085 | (lambda (string pred action) |
| 3085 | completion-ignore-case)) | 3086 | (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil |
| 3086 | (concat s2 (comint-unquote-filename | 3087 | completion-ignore-case)) |
| 3087 | (substring string (length s1)))))) | 3088 | (let ((rest (substring string (length s1)))) |
| 3088 | (res (if str (complete-with-action action table str pred)))) | 3089 | (concat s2 (if unquote-fun |
| 3089 | (when res | 3090 | (funcall unquote-fun rest) rest))))) |
| 3090 | (cond | 3091 | (res (if str (complete-with-action action table str pred)))) |
| 3091 | ((and (eq (car-safe action) 'boundaries)) | 3092 | (when res |
| 3092 | (let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0))) | 3093 | (cond |
| 3093 | (list* 'boundaries | 3094 | ((and (eq (car-safe action) 'boundaries)) |
| 3094 | (max (length s1) | 3095 | (let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0))) |
| 3095 | ;; FIXME: Adjust because of quoting/unquoting. | 3096 | (list* 'boundaries |
| 3096 | (+ beg (- (length s1) (length s2)))) | 3097 | (max (length s1) |
| 3097 | (and (eq (car-safe res) 'boundaries) (cddr res))))) | 3098 | ;; FIXME: Adjust because of quoting/unquoting. |
| 3098 | ((stringp res) | 3099 | (+ beg (- (length s1) (length s2)))) |
| 3099 | (if (eq t (compare-strings res 0 (length s2) s2 nil nil | 3100 | (and (eq (car-safe res) 'boundaries) (cddr res))))) |
| 3100 | completion-ignore-case)) | 3101 | ((stringp res) |
| 3101 | (concat s1 (comint-quote-filename | 3102 | (if (eq t (compare-strings res 0 (length s2) s2 nil nil |
| 3102 | (substring res (length s2)))))) | 3103 | completion-ignore-case)) |
| 3103 | ((eq action t) | 3104 | (let ((rest (substring res (length s2)))) |
| 3104 | (let ((bounds (completion-boundaries str table pred ""))) | 3105 | (concat s1 (if quote-fun (funcall quote-fun rest) rest))))) |
| 3105 | (if (>= (car bounds) (length s2)) | 3106 | ((eq action t) |
| 3106 | res | 3107 | (let ((bounds (completion-boundaries str table pred ""))) |
| 3107 | (let ((re (concat "\\`" | 3108 | (if (>= (car bounds) (length s2)) |
| 3108 | (regexp-quote (substring s2 (car bounds)))))) | 3109 | res |
| 3109 | (delq nil | 3110 | (let ((re (concat "\\`" |
| 3110 | (mapcar (lambda (c) | 3111 | (regexp-quote (substring s2 (car bounds)))))) |
| 3111 | (if (string-match re c) | 3112 | (delq nil |
| 3112 | (substring c (match-end 0)))) | 3113 | (mapcar (lambda (c) |
| 3113 | res)))))) | 3114 | (if (string-match re c) |
| 3114 | ;; E.g. action=nil and it's the only completion. | 3115 | (substring c (match-end 0)))) |
| 3115 | (res))))) | 3116 | res)))))) |
| 3117 | ;; E.g. action=nil and it's the only completion. | ||
| 3118 | (res)))))) | ||
| 3116 | 3119 | ||
| 3117 | (defun comint-completion-file-name-table (string pred action) | 3120 | (defun comint-completion-file-name-table (string pred action) |
| 3118 | (if (not (file-name-absolute-p string)) | 3121 | (if (not (file-name-absolute-p string)) |
| @@ -3146,10 +3149,10 @@ in the same way as TABLE completes strings of the form (concat S2 S)." | |||
| 3146 | (table | 3149 | (table |
| 3147 | (let ((prefixes (comint--common-quoted-suffix | 3150 | (let ((prefixes (comint--common-quoted-suffix |
| 3148 | unquoted filename))) | 3151 | unquoted filename))) |
| 3149 | (apply-partially | 3152 | (comint--table-subvert |
| 3150 | #'comint--table-subvert | ||
| 3151 | #'comint-completion-file-name-table | 3153 | #'comint-completion-file-name-table |
| 3152 | (cdr prefixes) (car prefixes))))) | 3154 | (cdr prefixes) (car prefixes) |
| 3155 | #'comint-quote-filename #'comint-unquote-filename)))) | ||
| 3153 | (nconc | 3156 | (nconc |
| 3154 | (list | 3157 | (list |
| 3155 | filename-beg filename-end | 3158 | filename-beg filename-end |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 232c6c3808e..3760a7a9d74 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -180,12 +180,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 180 | (symbol :format "%v")) | 180 | (symbol :format "%v")) |
| 181 | (const :tag "always" t))) | 181 | (const :tag "always" t))) |
| 182 | (debug-ignored-errors debug (repeat (choice symbol regexp))) | 182 | (debug-ignored-errors debug (repeat (choice symbol regexp))) |
| 183 | (debug-on-quit debug | 183 | (debug-on-quit debug boolean) |
| 184 | (choice (const :tag "off") | ||
| 185 | (repeat :menu-tag "When" | ||
| 186 | :value (nil) | ||
| 187 | (symbol :format "%v")) | ||
| 188 | (const :tag "always" t))) | ||
| 189 | ;; fileio.c | 184 | ;; fileio.c |
| 190 | (delete-by-moving-to-trash auto-save boolean "23.1") | 185 | (delete-by-moving-to-trash auto-save boolean "23.1") |
| 191 | (auto-save-visited-file-name auto-save boolean) | 186 | (auto-save-visited-file-name auto-save boolean) |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 57d25c9e169..176b906632c 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -1557,7 +1557,7 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 1557 | ;; The first spec is handled and the remainder-handler handles the rest. | 1557 | ;; The first spec is handled and the remainder-handler handles the rest. |
| 1558 | (let ((edebug-matching-depth | 1558 | (let ((edebug-matching-depth |
| 1559 | (if (> edebug-matching-depth edebug-max-depth) | 1559 | (if (> edebug-matching-depth edebug-max-depth) |
| 1560 | (error "too deep - perhaps infinite loop in spec?") | 1560 | (error "Too deep - perhaps infinite loop in spec?") |
| 1561 | (1+ edebug-matching-depth)))) | 1561 | (1+ edebug-matching-depth)))) |
| 1562 | (cond | 1562 | (cond |
| 1563 | ((null specs) nil) | 1563 | ((null specs) nil) |
| @@ -3201,7 +3201,7 @@ before returning. The default is one second." | |||
| 3201 | "Modify the breakpoint for the form at point or after it. | 3201 | "Modify the breakpoint for the form at point or after it. |
| 3202 | Set it if FLAG is non-nil, clear it otherwise. Then move to that point. | 3202 | Set it if FLAG is non-nil, clear it otherwise. Then move to that point. |
| 3203 | If CONDITION or TEMPORARY are non-nil, add those attributes to | 3203 | If CONDITION or TEMPORARY are non-nil, add those attributes to |
| 3204 | the breakpoint. " | 3204 | the breakpoint." |
| 3205 | (let ((edebug-stop-point (edebug-find-stop-point))) | 3205 | (let ((edebug-stop-point (edebug-find-stop-point))) |
| 3206 | (if edebug-stop-point | 3206 | (if edebug-stop-point |
| 3207 | (let* ((edebug-def-name (car edebug-stop-point)) | 3207 | (let* ((edebug-def-name (car edebug-stop-point)) |
| @@ -3879,24 +3879,23 @@ Global commands prefixed by `global-edebug-prefix': | |||
| 3879 | \\{global-edebug-map} | 3879 | \\{global-edebug-map} |
| 3880 | 3880 | ||
| 3881 | Options: | 3881 | Options: |
| 3882 | edebug-setup-hook | 3882 | `edebug-setup-hook' |
| 3883 | edebug-all-defs | 3883 | `edebug-all-defs' |
| 3884 | edebug-all-forms | 3884 | `edebug-all-forms' |
| 3885 | edebug-save-windows | 3885 | `edebug-save-windows' |
| 3886 | edebug-save-displayed-buffer-points | 3886 | `edebug-save-displayed-buffer-points' |
| 3887 | edebug-initial-mode | 3887 | `edebug-initial-mode' |
| 3888 | edebug-trace | 3888 | `edebug-trace' |
| 3889 | edebug-test-coverage | 3889 | `edebug-test-coverage' |
| 3890 | edebug-continue-kbd-macro | 3890 | `edebug-continue-kbd-macro' |
| 3891 | edebug-print-length | 3891 | `edebug-print-length' |
| 3892 | edebug-print-level | 3892 | `edebug-print-level' |
| 3893 | edebug-print-circle | 3893 | `edebug-print-circle' |
| 3894 | edebug-on-error | 3894 | `edebug-on-error' |
| 3895 | edebug-on-quit | 3895 | `edebug-on-quit' |
| 3896 | edebug-on-signal | 3896 | `edebug-on-signal' |
| 3897 | edebug-unwrap-results | 3897 | `edebug-unwrap-results' |
| 3898 | edebug-global-break-condition | 3898 | `edebug-global-break-condition'" |
| 3899 | " | ||
| 3900 | ;; If the user kills the buffer in which edebug is currently active, | 3899 | ;; If the user kills the buffer in which edebug is currently active, |
| 3901 | ;; exit to top level, because the edebug command loop can't usefully | 3900 | ;; exit to top level, because the edebug command loop can't usefully |
| 3902 | ;; continue running in such a case. | 3901 | ;; continue running in such a case. |
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 1a9d7c97b83..c33c2ccf9d1 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el | |||
| @@ -344,16 +344,16 @@ With prefix ARG, insert output into the current buffer at point." | |||
| 344 | (require 'esh-cmd) | 344 | (require 'esh-cmd) |
| 345 | (unless arg | 345 | (unless arg |
| 346 | (setq arg current-prefix-arg)) | 346 | (setq arg current-prefix-arg)) |
| 347 | (unwind-protect | 347 | (let ((eshell-non-interactive-p t)) |
| 348 | (let ((eshell-non-interactive-p t)) | 348 | ;; Enable `eshell-mode' only in this minibuffer. |
| 349 | (add-hook 'minibuffer-setup-hook 'eshell-mode) | 349 | (minibuffer-with-setup-hook #'(lambda () |
| 350 | (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) | 350 | (eshell-mode) |
| 351 | (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) | 351 | (eshell-return-exits-minibuffer)) |
| 352 | (unless command | 352 | (unwind-protect |
| 353 | (setq command (read-from-minibuffer "Emacs shell command: ")))) | 353 | (unless command |
| 354 | (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) | 354 | (setq command (read-from-minibuffer "Emacs shell command: "))) |
| 355 | (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) | 355 | (when command |
| 356 | (remove-hook 'minibuffer-setup-hook 'eshell-mode)) | 356 | (eshell-add-input-to-history command))))) |
| 357 | (unless command | 357 | (unless command |
| 358 | (error "No command specified!")) | 358 | (error "No command specified!")) |
| 359 | ;; redirection into the current buffer is achieved by adding an | 359 | ;; redirection into the current buffer is achieved by adding an |
diff --git a/lisp/faces.el b/lisp/faces.el index 9a14e832065..d5f0ef90ee0 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2065,9 +2065,9 @@ terminal type to a different value." | |||
| 2065 | (((supports :underline t)) | 2065 | (((supports :underline t)) |
| 2066 | :underline t) | 2066 | :underline t) |
| 2067 | (t | 2067 | (t |
| 2068 | ;; default to italic, even it doesn't appear to be supported, | 2068 | ;; Default to italic, even if it doesn't appear to be supported, |
| 2069 | ;; because in some cases the display engine will do it's own | 2069 | ;; because in some cases the display engine will do its own |
| 2070 | ;; workaround (to `dim' on ttys) | 2070 | ;; workaround (to `dim' on ttys). |
| 2071 | :slant italic)) | 2071 | :slant italic)) |
| 2072 | "Basic italic face." | 2072 | "Basic italic face." |
| 2073 | :group 'basic-faces) | 2073 | :group 'basic-faces) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a330d5c6be8..9c76635fb63 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2011-10-09 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * html2text.el (html2text-get-attr): Correctly handle attribute values | ||
| 4 | containing "=". | ||
| 5 | |||
| 6 | 2011-09-22 Kan-Ru Chen <kanru@kanru.info> | ||
| 7 | |||
| 8 | * ecomplete.el (ecomplete-display-matches): Use a local keymap to | ||
| 9 | handle bindings. | ||
| 10 | |||
| 11 | 2011-10-06 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 12 | |||
| 13 | * gnus-win.el (gnus-configure-windows): Protect against reading | ||
| 14 | ephemeral groups outside of Gnus. | ||
| 15 | |||
| 16 | 2011-10-06 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 17 | |||
| 18 | * shr.el (shr-tag-img): Don't get images displayed in tables. | ||
| 19 | |||
| 20 | 2011-10-03 Glenn Morris <rgm@gnu.org> | ||
| 21 | |||
| 22 | * gnus-group.el (gnus-bug-group-download-format-alist): Once again get | ||
| 23 | the "maintainer" version of debbugs.gnu.org reports. | ||
| 24 | |||
| 25 | 2011-10-02 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 26 | |||
| 27 | * shr.el (shr-tag-img): Add a space at the end of an ALT image text to | ||
| 28 | make asynchronous adjacent image insertion work better. | ||
| 29 | |||
| 1 | 2011-09-27 Daiki Ueno <ueno@unixuser.org> | 30 | 2011-09-27 Daiki Ueno <ueno@unixuser.org> |
| 2 | 31 | ||
| 3 | * plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify | 32 | * plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify |
diff --git a/lisp/gnus/ecomplete.el b/lisp/gnus/ecomplete.el index 6a47b119f10..5d1c46bc2f6 100644 --- a/lisp/gnus/ecomplete.el +++ b/lisp/gnus/ecomplete.el | |||
| @@ -27,6 +27,11 @@ | |||
| 27 | (eval-when-compile | 27 | (eval-when-compile |
| 28 | (require 'cl)) | 28 | (require 'cl)) |
| 29 | 29 | ||
| 30 | (eval-when-compile | ||
| 31 | (when (featurep 'xemacs) | ||
| 32 | ;; The `kbd' macro requires that the `read-kbd-macro' macro is available. | ||
| 33 | (require 'edmacro))) | ||
| 34 | |||
| 30 | (defgroup ecomplete nil | 35 | (defgroup ecomplete nil |
| 31 | "Electric completion of email addresses and the like." | 36 | "Electric completion of email addresses and the like." |
| 32 | :group 'mail) | 37 | :group 'mail) |
| @@ -123,15 +128,24 @@ | |||
| 123 | (message "%s" matches) | 128 | (message "%s" matches) |
| 124 | nil) | 129 | nil) |
| 125 | (setq highlight (ecomplete-highlight-match-line matches line)) | 130 | (setq highlight (ecomplete-highlight-match-line matches line)) |
| 126 | (while (not (memq (setq command (read-event highlight)) '(? return))) | 131 | (let ((local-map (make-sparse-keymap)) |
| 127 | (cond | 132 | selected) |
| 128 | ((eq command ?\M-n) | 133 | (define-key local-map (kbd "RET") |
| 129 | (setq line (min (1+ line) max-lines))) | 134 | (lambda () (setq selected (nth line (split-string matches "\n"))))) |
| 130 | ((eq command ?\M-p) | 135 | (define-key local-map (kbd "M-n") |
| 131 | (setq line (max (1- line) 0)))) | 136 | (lambda () (setq line (min (1+ line) max-lines)))) |
| 132 | (setq highlight (ecomplete-highlight-match-line matches line))) | 137 | (define-key local-map (kbd "M-p") |
| 133 | (when (eq command 'return) | 138 | (lambda () (setq line (max (1- line) 0)))) |
| 134 | (nth line (split-string matches "\n"))))))) | 139 | (let ((overriding-local-map local-map)) |
| 140 | (while (and (null selected) | ||
| 141 | (setq command (read-key-sequence highlight)) | ||
| 142 | (lookup-key local-map command)) | ||
| 143 | (apply (key-binding command) nil) | ||
| 144 | (setq highlight (ecomplete-highlight-match-line matches line)))) | ||
| 145 | (if selected | ||
| 146 | (message selected) | ||
| 147 | (message "Abort")) | ||
| 148 | selected))))) | ||
| 135 | 149 | ||
| 136 | (defun ecomplete-highlight-match-line (matches line) | 150 | (defun ecomplete-highlight-match-line (matches line) |
| 137 | (with-temp-buffer | 151 | (with-temp-buffer |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 720881acd98..4c527caff5c 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -2429,7 +2429,7 @@ Valid input formats include: | |||
| 2429 | (gnus-read-ephemeral-gmane-group group start range))) | 2429 | (gnus-read-ephemeral-gmane-group group start range))) |
| 2430 | 2430 | ||
| 2431 | (defcustom gnus-bug-group-download-format-alist | 2431 | (defcustom gnus-bug-group-download-format-alist |
| 2432 | '((emacs . "http://debbugs.gnu.org/%s;mboxstat=yes") | 2432 | '((emacs . "http://debbugs.gnu.org/%s;mboxmaint=yes;mboxstat=yes") |
| 2433 | (debian | 2433 | (debian |
| 2434 | . "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s&mbox=yes;mboxmaint=yes")) | 2434 | . "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s&mbox=yes;mboxmaint=yes")) |
| 2435 | "Alist of symbols for bug trackers and the corresponding URL format string. | 2435 | "Alist of symbols for bug trackers and the corresponding URL format string. |
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index c38f57d96cb..a1a8abc3086 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el | |||
| @@ -358,8 +358,13 @@ See the Gnus manual for an explanation of the syntax used.") | |||
| 358 | (defvar gnus-frame-split-p nil) | 358 | (defvar gnus-frame-split-p nil) |
| 359 | 359 | ||
| 360 | (defun gnus-configure-windows (setting &optional force) | 360 | (defun gnus-configure-windows (setting &optional force) |
| 361 | (if (window-configuration-p setting) | 361 | (cond |
| 362 | (set-window-configuration setting) | 362 | ((null setting) |
| 363 | ;; Do nothing. | ||
| 364 | ) | ||
| 365 | ((window-configuration-p setting) | ||
| 366 | (set-window-configuration setting)) | ||
| 367 | (t | ||
| 363 | (setq gnus-current-window-configuration setting) | 368 | (setq gnus-current-window-configuration setting) |
| 364 | (setq force (or force gnus-always-force-window-configuration)) | 369 | (setq force (or force gnus-always-force-window-configuration)) |
| 365 | (let ((split (if (symbolp setting) | 370 | (let ((split (if (symbolp setting) |
| @@ -410,7 +415,7 @@ See the Gnus manual for an explanation of the syntax used.") | |||
| 410 | (run-hooks 'gnus-configure-windows-hook) | 415 | (run-hooks 'gnus-configure-windows-hook) |
| 411 | (when gnus-window-frame-focus | 416 | (when gnus-window-frame-focus |
| 412 | (gnus-select-frame-set-input-focus | 417 | (gnus-select-frame-set-input-focus |
| 413 | (window-frame gnus-window-frame-focus)))))))) | 418 | (window-frame gnus-window-frame-focus))))))))) |
| 414 | 419 | ||
| 415 | (defun gnus-delete-windows-in-gnusey-frames () | 420 | (defun gnus-delete-windows-in-gnusey-frames () |
| 416 | "Do a `delete-other-windows' in all frames that have Gnus windows." | 421 | "Do a `delete-other-windows' in all frames that have Gnus windows." |
diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index 0635ab0afc6..7e699827141 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el | |||
| @@ -193,7 +193,7 @@ formatting, and then moved afterward.") | |||
| 193 | ;; size=3 | 193 | ;; size=3 |
| 194 | ((string-match "[^ ]=[^ ]" prev) | 194 | ((string-match "[^ ]=[^ ]" prev) |
| 195 | (let ((attr (nth 0 (split-string prev "="))) | 195 | (let ((attr (nth 0 (split-string prev "="))) |
| 196 | (value (nth 1 (split-string prev "=")))) | 196 | (value (substring prev (1+ (string-match "=" prev))))) |
| 197 | (setq attr-list (cons (list attr value) attr-list)))) | 197 | (setq attr-list (cons (list attr value) attr-list)))) |
| 198 | ;; size= 3 | 198 | ;; size= 3 |
| 199 | ((string-match "[^ ]=\\'" prev) | 199 | ((string-match "[^ ]=\\'" prev) |
| @@ -204,7 +204,7 @@ formatting, and then moved afterward.") | |||
| 204 | ;; size=3 | 204 | ;; size=3 |
| 205 | ((string-match "[^ ]=[^ ]" this) | 205 | ((string-match "[^ ]=[^ ]" this) |
| 206 | (let ((attr (nth 0 (split-string this "="))) | 206 | (let ((attr (nth 0 (split-string this "="))) |
| 207 | (value (nth 1 (split-string this "=")))) | 207 | (value (substring prev (1+ (string-match "=" this))))) |
| 208 | (setq attr-list (cons (list attr value) attr-list)))) | 208 | (setq attr-list (cons (list attr value) attr-list)))) |
| 209 | ;; size =3 | 209 | ;; size =3 |
| 210 | ((string-match "\\`=[^ ]" this) | 210 | ((string-match "\\`=[^ ]" this) |
| @@ -358,7 +358,7 @@ formatting, and then moved afterward.") | |||
| 358 | (delete-region p1 p4) | 358 | (delete-region p1 p4) |
| 359 | (when href | 359 | (when href |
| 360 | (goto-char p1) | 360 | (goto-char p1) |
| 361 | (insert (substring href 1 -1 )) | 361 | (insert (substring href 1 -1)) |
| 362 | (put-text-property p1 (point) 'face 'bold)))) | 362 | (put-text-property p1 (point) 'face 'bold)))) |
| 363 | 363 | ||
| 364 | ;; | 364 | ;; |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index f49bbd69da3..7b9af3302af 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -901,7 +901,7 @@ ones, in case fg and bg are nil." | |||
| 901 | (url-is-cached (shr-encode-url url))) | 901 | (url-is-cached (shr-encode-url url))) |
| 902 | (funcall shr-put-image-function (shr-get-image-data url) alt)) | 902 | (funcall shr-put-image-function (shr-get-image-data url) alt)) |
| 903 | (t | 903 | (t |
| 904 | (insert alt) | 904 | (insert alt " ") |
| 905 | (when (and shr-ignore-cache | 905 | (when (and shr-ignore-cache |
| 906 | (url-is-cached (shr-encode-url url))) | 906 | (url-is-cached (shr-encode-url url))) |
| 907 | (let ((file (url-cache-create-filename (shr-encode-url url)))) | 907 | (let ((file (url-cache-create-filename (shr-encode-url url)))) |
| @@ -912,14 +912,15 @@ ones, in case fg and bg are nil." | |||
| 912 | 'url-queue-retrieve | 912 | 'url-queue-retrieve |
| 913 | 'url-retrieve) | 913 | 'url-retrieve) |
| 914 | (shr-encode-url url) 'shr-image-fetched | 914 | (shr-encode-url url) 'shr-image-fetched |
| 915 | (list (current-buffer) start (point-marker)) | 915 | (list (current-buffer) start (set-marker (make-marker) (1- (point)))) |
| 916 | t))) | 916 | t))) |
| 917 | (put-text-property start (point) 'keymap shr-map) | 917 | (when (zerop shr-table-depth) ;; We are not in a table. |
| 918 | (put-text-property start (point) 'shr-alt alt) | 918 | (put-text-property start (point) 'keymap shr-map) |
| 919 | (put-text-property start (point) 'image-url url) | 919 | (put-text-property start (point) 'shr-alt alt) |
| 920 | (put-text-property start (point) 'image-displayer | 920 | (put-text-property start (point) 'image-url url) |
| 921 | (shr-image-displayer shr-content-function)) | 921 | (put-text-property start (point) 'image-displayer |
| 922 | (put-text-property start (point) 'help-echo alt) | 922 | (shr-image-displayer shr-content-function)) |
| 923 | (put-text-property start (point) 'help-echo alt)) | ||
| 923 | (setq shr-state 'image))))) | 924 | (setq shr-state 'image))))) |
| 924 | 925 | ||
| 925 | (defun shr-tag-pre (cont) | 926 | (defun shr-tag-pre (cont) |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 3276447e72f..0a5d6ed954c 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -1306,17 +1306,22 @@ If nil, that means no input method is activated now.") | |||
| 1306 | (make-variable-buffer-local 'current-input-method-title) | 1306 | (make-variable-buffer-local 'current-input-method-title) |
| 1307 | (put 'current-input-method-title 'permanent-local t) | 1307 | (put 'current-input-method-title 'permanent-local t) |
| 1308 | 1308 | ||
| 1309 | (define-widget 'mule-input-method-string 'string | ||
| 1310 | "String widget with completion for input method." | ||
| 1311 | :completions | ||
| 1312 | (lambda (string pred action) | ||
| 1313 | (let ((completion-ignore-case t)) | ||
| 1314 | (complete-with-action action input-method-alist string pred))) | ||
| 1315 | :prompt-history 'input-method-history) | ||
| 1316 | |||
| 1309 | (defcustom default-input-method nil | 1317 | (defcustom default-input-method nil |
| 1310 | "Default input method for multilingual text (a string). | 1318 | "Default input method for multilingual text (a string). |
| 1311 | This is the input method activated automatically by the command | 1319 | This is the input method activated automatically by the command |
| 1312 | `toggle-input-method' (\\[toggle-input-method])." | 1320 | `toggle-input-method' (\\[toggle-input-method])." |
| 1313 | :link '(custom-manual "(emacs)Input Methods") | 1321 | :link '(custom-manual "(emacs)Input Methods") |
| 1314 | :group 'mule | 1322 | :group 'mule |
| 1315 | :type '(choice (const nil) | 1323 | :type `(choice (const nil) |
| 1316 | (string | 1324 | mule-input-method-string) |
| 1317 | :completions (apply-partially | ||
| 1318 | #'completion-table-case-fold input-method-alist) | ||
| 1319 | :prompt-history input-method-history)) | ||
| 1320 | :set-after '(current-language-environment)) | 1325 | :set-after '(current-language-environment)) |
| 1321 | 1326 | ||
| 1322 | (put 'input-method-function 'permanent-local t) | 1327 | (put 'input-method-function 'permanent-local t) |
| @@ -1879,10 +1884,11 @@ specifies the character set for the major languages of Western Europe." | |||
| 1879 | (define-widget 'charset 'symbol | 1884 | (define-widget 'charset 'symbol |
| 1880 | "An Emacs charset." | 1885 | "An Emacs charset." |
| 1881 | :tag "Charset" | 1886 | :tag "Charset" |
| 1882 | :completions (apply-partially #'completion-table-with-predicate | 1887 | :completions |
| 1883 | (apply-partially #'completion-table-case-fold | 1888 | (lambda (string pred action) |
| 1884 | obarray) | 1889 | (let ((completion-ignore-case t)) |
| 1885 | #'charsetp 'strict) | 1890 | (completion-table-with-predicate |
| 1891 | obarray #'charsetp 'strict string pred action))) | ||
| 1886 | :value 'ascii | 1892 | :value 'ascii |
| 1887 | :validate (lambda (widget) | 1893 | :validate (lambda (widget) |
| 1888 | (unless (charsetp (widget-value widget)) | 1894 | (unless (charsetp (widget-value widget)) |
| @@ -1917,8 +1923,10 @@ See `set-language-info-alist' for use in programs." | |||
| 1917 | :type `(alist | 1923 | :type `(alist |
| 1918 | :key-type (string :tag "Language environment" | 1924 | :key-type (string :tag "Language environment" |
| 1919 | :completions | 1925 | :completions |
| 1920 | (apply-partially #'completion-table-case-fold | 1926 | (lambda (string pred action) |
| 1921 | language-info-alist)) | 1927 | (let ((completion-ignore-case t)) |
| 1928 | (complete-with-action | ||
| 1929 | action language-info-alist string pred)))) | ||
| 1922 | :value-type | 1930 | :value-type |
| 1923 | (alist :key-type symbol | 1931 | (alist :key-type symbol |
| 1924 | :options ((documentation string) | 1932 | :options ((documentation string) |
| @@ -1929,12 +1937,7 @@ See `set-language-info-alist' for use in programs." | |||
| 1929 | (coding-system (repeat coding-system)) | 1937 | (coding-system (repeat coding-system)) |
| 1930 | (coding-priority (repeat coding-system)) | 1938 | (coding-priority (repeat coding-system)) |
| 1931 | (nonascii-translation charset) | 1939 | (nonascii-translation charset) |
| 1932 | (input-method | 1940 | (input-method mule-input-method-string) |
| 1933 | (string | ||
| 1934 | :completions | ||
| 1935 | (apply-partially #'completion-table-case-fold | ||
| 1936 | input-method-alist) | ||
| 1937 | :prompt-history input-method-history)) | ||
| 1938 | (features (repeat symbol)) | 1941 | (features (repeat symbol)) |
| 1939 | (unibyte-display coding-system))))) | 1942 | (unibyte-display coding-system))))) |
| 1940 | 1943 | ||
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index edcc82011af..026b03e350f 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -924,7 +924,7 @@ The list is in preference order.") | |||
| 924 | (defun smtpmail-send-data (process buffer) | 924 | (defun smtpmail-send-data (process buffer) |
| 925 | (let ((data-continue t) sending-data | 925 | (let ((data-continue t) sending-data |
| 926 | (pr (with-current-buffer buffer | 926 | (pr (with-current-buffer buffer |
| 927 | (make-progress-reporter "Sending email" | 927 | (make-progress-reporter "Sending email " |
| 928 | (point-min) (point-max))))) | 928 | (point-min) (point-max))))) |
| 929 | (with-current-buffer buffer | 929 | (with-current-buffer buffer |
| 930 | (goto-char (point-min))) | 930 | (goto-char (point-min))) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 021e46d5053..e2ed07f1ef1 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -216,9 +216,13 @@ You should give VAR a non-nil `risky-local-variable' property." | |||
| 216 | (setq ,var (,fun))) | 216 | (setq ,var (,fun))) |
| 217 | ,var)))) | 217 | ,var)))) |
| 218 | 218 | ||
| 219 | (defun completion-table-case-fold (table string pred action) | 219 | (defun completion-table-case-fold (table &optional dont-fold) |
| 220 | (let ((completion-ignore-case t)) | 220 | "Return new completion TABLE that is case insensitive. |
| 221 | (complete-with-action action table string pred))) | 221 | If DONT-FOLD is non-nil, return a completion table that is |
| 222 | case sensitive instead." | ||
| 223 | (lambda (string pred action) | ||
| 224 | (let ((completion-ignore-case (not dont-fold))) | ||
| 225 | (complete-with-action action table string pred)))) | ||
| 222 | 226 | ||
| 223 | (defun completion-table-with-context (prefix table string pred action) | 227 | (defun completion-table-with-context (prefix table string pred action) |
| 224 | ;; TODO: add `suffix' maybe? | 228 | ;; TODO: add `suffix' maybe? |
| @@ -468,6 +472,15 @@ ALL-COMPLETIONS is the function that lists the completions (it should | |||
| 468 | follow the calling convention of `completion-all-completions'), | 472 | follow the calling convention of `completion-all-completions'), |
| 469 | and DOC describes the way this style of completion works.") | 473 | and DOC describes the way this style of completion works.") |
| 470 | 474 | ||
| 475 | (defconst completion--styles-type | ||
| 476 | `(repeat :tag "insert a new menu to add more styles" | ||
| 477 | (choice ,@(mapcar (lambda (x) (list 'const (car x))) | ||
| 478 | completion-styles-alist)))) | ||
| 479 | (defconst completion--cycling-threshold-type | ||
| 480 | '(choice (const :tag "No cycling" nil) | ||
| 481 | (const :tag "Always cycle" t) | ||
| 482 | (integer :tag "Threshold"))) | ||
| 483 | |||
| 471 | (defcustom completion-styles | 484 | (defcustom completion-styles |
| 472 | ;; First, use `basic' because prefix completion has been the standard | 485 | ;; First, use `basic' because prefix completion has been the standard |
| 473 | ;; for "ever" and works well in most cases, so using it first | 486 | ;; for "ever" and works well in most cases, so using it first |
| @@ -486,8 +499,7 @@ The available styles are listed in `completion-styles-alist'. | |||
| 486 | 499 | ||
| 487 | Note that `completion-category-overrides' may override these | 500 | Note that `completion-category-overrides' may override these |
| 488 | styles for specific categories, such as files, buffers, etc." | 501 | styles for specific categories, such as files, buffers, etc." |
| 489 | :type `(repeat (choice ,@(mapcar (lambda (x) (list 'const (car x))) | 502 | :type completion--styles-type |
| 490 | completion-styles-alist))) | ||
| 491 | :group 'minibuffer | 503 | :group 'minibuffer |
| 492 | :version "23.1") | 504 | :version "23.1") |
| 493 | 505 | ||
| @@ -498,18 +510,19 @@ Each override has the shape (CATEGORY . ALIST) where ALIST is | |||
| 498 | an association list that can specify properties such as: | 510 | an association list that can specify properties such as: |
| 499 | - `styles': the list of `completion-styles' to use for that category. | 511 | - `styles': the list of `completion-styles' to use for that category. |
| 500 | - `cycle': the `completion-cycle-threshold' to use for that category." | 512 | - `cycle': the `completion-cycle-threshold' to use for that category." |
| 501 | :type `(alist :key-type (choice (const buffer) | 513 | :type `(alist :key-type (choice :tag "Category" |
| 514 | (const buffer) | ||
| 502 | (const file) | 515 | (const file) |
| 516 | (const unicode-name) | ||
| 503 | symbol) | 517 | symbol) |
| 504 | :value-type | 518 | :value-type |
| 505 | (set | 519 | (set :tag "Properties to override" |
| 506 | (cons (const style) | 520 | (cons :tag "Completion Styles" |
| 507 | (repeat ,@(mapcar (lambda (x) (list 'const (car x))) | 521 | (const :tag "Select a style from the menu;" styles) |
| 508 | completion-styles-alist))) | 522 | ,completion--styles-type) |
| 509 | (cons (const cycle) | 523 | (cons :tag "Completion Cycling" |
| 510 | (choice (const :tag "No cycling" nil) | 524 | (const :tag "Select one value from the menu." cycle) |
| 511 | (const :tag "Always cycle" t) | 525 | ,completion--cycling-threshold-type)))) |
| 512 | (integer :tag "Threshold")))))) | ||
| 513 | 526 | ||
| 514 | (defun completion--styles (metadata) | 527 | (defun completion--styles (metadata) |
| 515 | (let* ((cat (completion-metadata-get metadata 'category)) | 528 | (let* ((cat (completion-metadata-get metadata 'category)) |
| @@ -595,9 +608,7 @@ If nil, cycling is never used. | |||
| 595 | If t, cycling is always used. | 608 | If t, cycling is always used. |
| 596 | If an integer, cycling is used as soon as there are fewer completion | 609 | If an integer, cycling is used as soon as there are fewer completion |
| 597 | candidates than this number." | 610 | candidates than this number." |
| 598 | :type '(choice (const :tag "No cycling" nil) | 611 | :type completion--cycling-threshold-type) |
| 599 | (const :tag "Always cycle" t) | ||
| 600 | (integer :tag "Threshold"))) | ||
| 601 | 612 | ||
| 602 | (defun completion--cycle-threshold (metadata) | 613 | (defun completion--cycle-threshold (metadata) |
| 603 | (let* ((cat (completion-metadata-get metadata 'category)) | 614 | (let* ((cat (completion-metadata-get metadata 'category)) |
diff --git a/lisp/mpc.el b/lisp/mpc.el index 8854d4e908f..251e1864927 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -1089,10 +1089,12 @@ If PLAYLIST is t or nil or missing, use the main playlist." | |||
| 1089 | (defvar mpc-tool-bar-map | 1089 | (defvar mpc-tool-bar-map |
| 1090 | (let ((map (make-sparse-keymap))) | 1090 | (let ((map (make-sparse-keymap))) |
| 1091 | (tool-bar-local-item "mpc/prev" 'mpc-prev 'prev map | 1091 | (tool-bar-local-item "mpc/prev" 'mpc-prev 'prev map |
| 1092 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop"))) | 1092 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop")) |
| 1093 | :label "Prev" :vert-only t) | ||
| 1093 | ;; FIXME: how can we bind it to the down-event? | 1094 | ;; FIXME: how can we bind it to the down-event? |
| 1094 | (tool-bar-local-item "mpc/rewind" 'mpc-rewind 'rewind map | 1095 | (tool-bar-local-item "mpc/rewind" 'mpc-rewind 'rewind map |
| 1095 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop")) | 1096 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop")) |
| 1097 | :label "Rew" :vert-only t | ||
| 1096 | :button '(:toggle . (and mpc--faster-toggle-timer | 1098 | :button '(:toggle . (and mpc--faster-toggle-timer |
| 1097 | (not mpc--faster-toggle-forward)))) | 1099 | (not mpc--faster-toggle-forward)))) |
| 1098 | ;; We could use a single toggle command for pause/play, with 2 different | 1100 | ;; We could use a single toggle command for pause/play, with 2 different |
| @@ -1100,20 +1102,26 @@ If PLAYLIST is t or nil or missing, use the main playlist." | |||
| 1100 | ;; to be a toggle-button, thus displayed depressed in one of the | 1102 | ;; to be a toggle-button, thus displayed depressed in one of the |
| 1101 | ;; two states :-( | 1103 | ;; two states :-( |
| 1102 | (tool-bar-local-item "mpc/pause" 'mpc-pause 'pause map | 1104 | (tool-bar-local-item "mpc/pause" 'mpc-pause 'pause map |
| 1105 | :label "Pause" :vert-only t | ||
| 1103 | :visible '(equal (cdr (assq 'state mpc-status)) "play") | 1106 | :visible '(equal (cdr (assq 'state mpc-status)) "play") |
| 1104 | :help "Pause/play") | 1107 | :help "Pause/play") |
| 1105 | (tool-bar-local-item "mpc/play" 'mpc-play 'play map | 1108 | (tool-bar-local-item "mpc/play" 'mpc-play 'play map |
| 1109 | :label "Play" :vert-only t | ||
| 1106 | :visible '(not (equal (cdr (assq 'state mpc-status)) "play")) | 1110 | :visible '(not (equal (cdr (assq 'state mpc-status)) "play")) |
| 1107 | :help "Play/pause") | 1111 | :help "Play/pause") |
| 1108 | ;; FIXME: how can we bind it to the down-event? | 1112 | ;; FIXME: how can we bind it to the down-event? |
| 1109 | (tool-bar-local-item "mpc/ffwd" 'mpc-ffwd 'ffwd map | 1113 | (tool-bar-local-item "mpc/ffwd" 'mpc-ffwd 'ffwd map |
| 1110 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop")) | 1114 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop")) |
| 1115 | :label "Ffwd" :vert-only t | ||
| 1111 | :button '(:toggle . (and mpc--faster-toggle-timer | 1116 | :button '(:toggle . (and mpc--faster-toggle-timer |
| 1112 | mpc--faster-toggle-forward))) | 1117 | mpc--faster-toggle-forward))) |
| 1113 | (tool-bar-local-item "mpc/next" 'mpc-next 'next map | 1118 | (tool-bar-local-item "mpc/next" 'mpc-next 'next map |
| 1119 | :label "Next" :vert-only t | ||
| 1114 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop"))) | 1120 | :enable '(not (equal (cdr (assq 'state mpc-status)) "stop"))) |
| 1115 | (tool-bar-local-item "mpc/stop" 'mpc-stop 'stop map) | 1121 | (tool-bar-local-item "mpc/stop" 'mpc-stop 'stop map |
| 1122 | :label "Stop" :vert-only t) | ||
| 1116 | (tool-bar-local-item "mpc/add" 'mpc-playlist-add 'add map | 1123 | (tool-bar-local-item "mpc/add" 'mpc-playlist-add 'add map |
| 1124 | :label "Add" :vert-only t | ||
| 1117 | :help "Append to the playlist") | 1125 | :help "Append to the playlist") |
| 1118 | map)) | 1126 | map)) |
| 1119 | 1127 | ||
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1381d33efa2..7ace2911501 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1886,7 +1886,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 1886 | (apply foreign operation args)) | 1886 | (apply foreign operation args)) |
| 1887 | 1887 | ||
| 1888 | ;; Trace that somebody has interrupted the operation. | 1888 | ;; Trace that somebody has interrupted the operation. |
| 1889 | (quit | 1889 | ((debug quit) |
| 1890 | (let (tramp-message-show-message) | 1890 | (let (tramp-message-show-message) |
| 1891 | (tramp-message | 1891 | (tramp-message |
| 1892 | v 1 "Interrupt received in operation %s" | 1892 | v 1 "Interrupt received in operation %s" |
| @@ -1898,6 +1898,9 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 1898 | ;; operations shall return at least a default value | 1898 | ;; operations shall return at least a default value |
| 1899 | ;; in order to give the user a chance to correct the | 1899 | ;; in order to give the user a chance to correct the |
| 1900 | ;; file name in the minibuffer. | 1900 | ;; file name in the minibuffer. |
| 1901 | ;; We cannot use 'debug as error handler. In order | ||
| 1902 | ;; to get a full backtrace, one could apply | ||
| 1903 | ;; (setq debug-on-error t debug-on-signal t) | ||
| 1901 | (error | 1904 | (error |
| 1902 | (cond | 1905 | (cond |
| 1903 | ((and completion (zerop (length localname)) | 1906 | ((and completion (zerop (length localname)) |
| @@ -3850,9 +3853,9 @@ Only works for Bourne-like shells." | |||
| 3850 | ;; * Run emerge on two remote files. Bug is described here: | 3853 | ;; * Run emerge on two remote files. Bug is described here: |
| 3851 | ;; <http://www.mail-archive.com/tramp-devel@nongnu.org/msg01041.html>. | 3854 | ;; <http://www.mail-archive.com/tramp-devel@nongnu.org/msg01041.html>. |
| 3852 | ;; (Bug#6850) | 3855 | ;; (Bug#6850) |
| 3853 | 3856 | ;; * It would be very useful if it were possible to load or save a | |
| 3854 | ;; Functions for file-name-handler-alist: | 3857 | ;; buffer using Tramp in a non-blocking way so that use of Emacs on |
| 3855 | ;; diff-latest-backup-file -- in diff.el | 3858 | ;; other buffers could continue. (Bug#9617) |
| 3856 | 3859 | ||
| 3857 | ;;; tramp.el ends here | 3860 | ;;; tramp.el ends here |
| 3858 | 3861 | ||
diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index e947bfe1da6..b466c2cd899 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el | |||
| @@ -193,10 +193,25 @@ Uses both `pcmpl-ssh-config-file' and `pcmpl-ssh-known-hosts-file'." | |||
| 193 | "Completion rules for the `scp' command. | 193 | "Completion rules for the `scp' command. |
| 194 | Includes files as well as host names followed by a colon." | 194 | Includes files as well as host names followed by a colon." |
| 195 | (pcomplete-opt "1246BCpqrvcFiloPS") | 195 | (pcomplete-opt "1246BCpqrvcFiloPS") |
| 196 | (while t (pcomplete-here (append (pcomplete-all-entries) | 196 | (while t (pcomplete-here |
| 197 | (mapcar (lambda (host) | 197 | (lambda (string pred action) |
| 198 | (concat host ":")) | 198 | (let ((table |
| 199 | (pcmpl-ssh-hosts)))))) | 199 | (cond |
| 200 | ((string-match "\\`[^:/]+:" string) ; Remote file name. | ||
| 201 | (if (and (eq action 'lambda) | ||
| 202 | (eq (match-end 0) (length string))) | ||
| 203 | ;; Avoid connecting to the remote host when we're | ||
| 204 | ;; only completing the host name. | ||
| 205 | (list string) | ||
| 206 | (comint--table-subvert (pcomplete-all-entries) | ||
| 207 | "" "/ssh:"))) | ||
| 208 | ((string-match "/" string) ; Local file name. | ||
| 209 | (pcomplete-all-entries)) | ||
| 210 | (t ;Host name or local file name. | ||
| 211 | (append (all-completions string (pcomplete-all-entries)) | ||
| 212 | (mapcar (lambda (host) (concat host ":")) | ||
| 213 | (pcmpl-ssh-hosts))))))) | ||
| 214 | (complete-with-action action table string pred)))))) | ||
| 200 | 215 | ||
| 201 | (provide 'pcmpl-unix) | 216 | (provide 'pcmpl-unix) |
| 202 | 217 | ||
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 4ac69df8e3a..8ae1e203849 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -370,7 +370,7 @@ modified to be an empty string, or the desired separation string." | |||
| 370 | ;; it pretty much impossible to have completion other than | 370 | ;; it pretty much impossible to have completion other than |
| 371 | ;; prefix-completion. | 371 | ;; prefix-completion. |
| 372 | ;; | 372 | ;; |
| 373 | ;; pcomplete--common-quoted-suffix and pcomplete--table-subvert try to | 373 | ;; pcomplete--common-quoted-suffix and comint--table-subvert try to |
| 374 | ;; work around this difficulty with heuristics, but it's | 374 | ;; work around this difficulty with heuristics, but it's |
| 375 | ;; really a hack. | 375 | ;; really a hack. |
| 376 | 376 | ||
| @@ -408,45 +408,6 @@ SS1 = (unquote SS2)." | |||
| 408 | (cons (substring s1 0 (- (length s1) cs)) | 408 | (cons (substring s1 0 (- (length s1) cs)) |
| 409 | (substring s2 0 (- (length s2) cs)))))) | 409 | (substring s2 0 (- (length s2) cs)))))) |
| 410 | 410 | ||
| 411 | (defun pcomplete--table-subvert (table s1 s2 string pred action) | ||
| 412 | ;; FIXME: Copied in comint.el. | ||
| 413 | "Completion table that replaces the prefix S1 with S2 in STRING. | ||
| 414 | When TABLE, S1 and S2 are provided by `apply-partially', the result | ||
| 415 | is a completion table which completes strings of the form (concat S1 S) | ||
| 416 | in the same way as TABLE completes strings of the form (concat S2 S)." | ||
| 417 | (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil | ||
| 418 | completion-ignore-case)) | ||
| 419 | (concat s2 (pcomplete-unquote-argument | ||
| 420 | (substring string (length s1)))))) | ||
| 421 | (res (if str (complete-with-action action table str pred)))) | ||
| 422 | (when res | ||
| 423 | (cond | ||
| 424 | ((and (eq (car-safe action) 'boundaries)) | ||
| 425 | (let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0))) | ||
| 426 | (list* 'boundaries | ||
| 427 | (max (length s1) | ||
| 428 | ;; FIXME: Adjust because of quoting/unquoting. | ||
| 429 | (+ beg (- (length s1) (length s2)))) | ||
| 430 | (and (eq (car-safe res) 'boundaries) (cddr res))))) | ||
| 431 | ((stringp res) | ||
| 432 | (if (eq t (compare-strings res 0 (length s2) s2 nil nil | ||
| 433 | completion-ignore-case)) | ||
| 434 | (concat s1 (pcomplete-quote-argument | ||
| 435 | (substring res (length s2)))))) | ||
| 436 | ((eq action t) | ||
| 437 | (let ((bounds (completion-boundaries str table pred ""))) | ||
| 438 | (if (>= (car bounds) (length s2)) | ||
| 439 | res | ||
| 440 | (let ((re (concat "\\`" | ||
| 441 | (regexp-quote (substring s2 (car bounds)))))) | ||
| 442 | (delq nil | ||
| 443 | (mapcar (lambda (c) | ||
| 444 | (if (string-match re c) | ||
| 445 | (substring c (match-end 0)))) | ||
| 446 | res)))))) | ||
| 447 | ;; E.g. action=nil and it's the only completion. | ||
| 448 | (res))))) | ||
| 449 | |||
| 450 | ;; I don't think such commands are usable before first setting up buffer-local | 411 | ;; I don't think such commands are usable before first setting up buffer-local |
| 451 | ;; variables to parse args, so there's no point autoloading it. | 412 | ;; variables to parse args, so there's no point autoloading it. |
| 452 | ;; ;;;###autoload | 413 | ;; ;;;###autoload |
| @@ -480,7 +441,7 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 480 | ;; pcomplete-stub and works from the buffer's text instead, | 441 | ;; pcomplete-stub and works from the buffer's text instead, |
| 481 | ;; we need to trick minibuffer-complete, into using | 442 | ;; we need to trick minibuffer-complete, into using |
| 482 | ;; pcomplete-stub without its knowledge. To that end, we | 443 | ;; pcomplete-stub without its knowledge. To that end, we |
| 483 | ;; use pcomplete--table-subvert to construct a completion | 444 | ;; use comint--table-subvert to construct a completion |
| 484 | ;; table which expects strings using a prefix from the | 445 | ;; table which expects strings using a prefix from the |
| 485 | ;; buffer's text but internally uses the corresponding | 446 | ;; buffer's text but internally uses the corresponding |
| 486 | ;; prefix from pcomplete-stub. | 447 | ;; prefix from pcomplete-stub. |
| @@ -498,9 +459,9 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 498 | ;; practice it should work just fine (fingers crossed). | 459 | ;; practice it should work just fine (fingers crossed). |
| 499 | (let ((prefixes (pcomplete--common-quoted-suffix | 460 | (let ((prefixes (pcomplete--common-quoted-suffix |
| 500 | pcomplete-stub buftext))) | 461 | pcomplete-stub buftext))) |
| 501 | (apply-partially #'pcomplete--table-subvert | 462 | (comint--table-subvert |
| 502 | completions | 463 | completions (cdr prefixes) (car prefixes) |
| 503 | (cdr prefixes) (car prefixes)))) | 464 | #'pcomplete-quote-argument #'pcomplete-unquote-argument))) |
| 504 | (t | 465 | (t |
| 505 | (lambda (string pred action) | 466 | (lambda (string pred action) |
| 506 | (let ((res (complete-with-action | 467 | (let ((res (complete-with-action |
| @@ -523,8 +484,7 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 523 | (funcall norm-func (directory-file-name f)) | 484 | (funcall norm-func (directory-file-name f)) |
| 524 | seen))))))) | 485 | seen))))))) |
| 525 | (when pcomplete-ignore-case | 486 | (when pcomplete-ignore-case |
| 526 | (setq table | 487 | (setq table (completion-table-case-fold table))) |
| 527 | (apply-partially #'completion-table-case-fold table))) | ||
| 528 | (list beg (point) table | 488 | (list beg (point) table |
| 529 | :predicate pred | 489 | :predicate pred |
| 530 | :exit-function | 490 | :exit-function |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index eb33822ce55..3d5c8a97835 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -1489,14 +1489,19 @@ Does not check type and subprogram indentation." | |||
| 1489 | (if (not (f90-previous-statement)) | 1489 | (if (not (f90-previous-statement)) |
| 1490 | ;; If f90-previous-statement returns nil, we must have been | 1490 | ;; If f90-previous-statement returns nil, we must have been |
| 1491 | ;; called from on or before the first line of the first statement. | 1491 | ;; called from on or before the first line of the first statement. |
| 1492 | (setq icol (if (save-excursion | 1492 | (setq icol (if (or (save-excursion |
| 1493 | ;; f90-previous-statement has moved us over | 1493 | (goto-char pnt) |
| 1494 | ;; comment/blank lines, so we need to get | 1494 | (beginning-of-line) |
| 1495 | ;; back to the first code statement. | 1495 | ;; Preprocessor line before code statement. |
| 1496 | (when (looking-at "[ \t]*\\([!#]\\|$\\)") | 1496 | (looking-at "[ \t]*#")) |
| 1497 | (f90-next-statement)) | 1497 | (progn |
| 1498 | (skip-chars-forward " \t0-9") | 1498 | ;; f90-previous-statement has moved us over |
| 1499 | (f90-looking-at-program-block-start)) | 1499 | ;; comment/blank lines, so we need to get |
| 1500 | ;; back to the first code statement. | ||
| 1501 | (when (looking-at "[ \t]*\\([!#]\\|$\\)") | ||
| 1502 | (f90-next-statement)) | ||
| 1503 | (skip-chars-forward " \t0-9") | ||
| 1504 | (f90-looking-at-program-block-start))) | ||
| 1500 | 0 | 1505 | 0 |
| 1501 | ;; No explicit PROGRAM start statement. | 1506 | ;; No explicit PROGRAM start statement. |
| 1502 | f90-program-indent)) | 1507 | f90-program-indent)) |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index a4d7cff4127..22db7b2e5f4 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -605,6 +605,12 @@ NOARG must be t when this macro is used outside `gud-def'" | |||
| 605 | The directory containing FILE becomes the initial working directory | 605 | The directory containing FILE becomes the initial working directory |
| 606 | and source-file directory for your debugger. | 606 | and source-file directory for your debugger. |
| 607 | 607 | ||
| 608 | COMMAND-LINE is the shell command for starting the gdb session. | ||
| 609 | It should be a string consisting of the name of the gdb | ||
| 610 | executable followed by command-line options. The command-line | ||
| 611 | options should include \"-i=mi\" to use gdb's MI text interface. | ||
| 612 | Note that the old \"--annotate\" option is no longer supported. | ||
| 613 | |||
| 608 | If `gdb-many-windows' is nil (the default value) then gdb just | 614 | If `gdb-many-windows' is nil (the default value) then gdb just |
| 609 | pops up the GUD buffer unless `gdb-show-main' is t. In this case | 615 | pops up the GUD buffer unless `gdb-show-main' is t. In this case |
| 610 | it starts with two windows: one displaying the GUD buffer and the | 616 | it starts with two windows: one displaying the GUD buffer and the |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 933f004bb5d..f051b49fe2a 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -633,8 +633,8 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'." | |||
| 633 | 633 | ||
| 634 | (defalias 'electric-perl-terminator 'perl-electric-terminator) | 634 | (defalias 'electric-perl-terminator 'perl-electric-terminator) |
| 635 | (defun perl-electric-terminator (arg) | 635 | (defun perl-electric-terminator (arg) |
| 636 | "Insert character and adjust indentation. | 636 | "Insert character and maybe adjust indentation. |
| 637 | If at end-of-line, and not in a comment or a quote, correct the's indentation." | 637 | If at end-of-line, and not in a comment or a quote, correct the indentation." |
| 638 | (interactive "P") | 638 | (interactive "P") |
| 639 | (let ((insertpos (point))) | 639 | (let ((insertpos (point))) |
| 640 | (and (not arg) ; decide whether to indent | 640 | (and (not arg) ; decide whether to indent |
| @@ -832,7 +832,11 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." | |||
| 832 | (save-excursion | 832 | (save-excursion |
| 833 | (beginning-of-line) | 833 | (beginning-of-line) |
| 834 | (looking-at "\\s-+sub\\>")) | 834 | (looking-at "\\s-+sub\\>")) |
| 835 | (> indent-point (save-excursion (forward-sexp 1) (point)))) | 835 | (> indent-point (save-excursion |
| 836 | (condition-case nil | ||
| 837 | (forward-sexp 1) | ||
| 838 | (scan-error nil)) | ||
| 839 | (point)))) | ||
| 836 | (perl-beginning-of-function)) | 840 | (perl-beginning-of-function)) |
| 837 | (while (< (point) indent-point) ;repeat until right sexp | 841 | (while (< (point) indent-point) ;repeat until right sexp |
| 838 | (setq state (parse-partial-sexp (point) indent-point 0)) | 842 | (setq state (parse-partial-sexp (point) indent-point 0)) |
diff --git a/lisp/simple.el b/lisp/simple.el index c81385680bf..af6d855d9c0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -945,28 +945,46 @@ rather than line counts." | |||
| 945 | (forward-line (1- line))))) | 945 | (forward-line (1- line))))) |
| 946 | 946 | ||
| 947 | (defun count-words-region (start end) | 947 | (defun count-words-region (start end) |
| 948 | "Count the number of words in the active region. | 948 | "Return the number of words between START and END. |
| 949 | If the region is not active, counts the number of words in the buffer." | 949 | If called interactively, print a message reporting the number of |
| 950 | (interactive (if (use-region-p) (list (region-beginning) (region-end)) | 950 | lines, words, and characters in the region." |
| 951 | (list (point-min) (point-max)))) | 951 | (interactive "r") |
| 952 | (let ((count 0)) | 952 | (let ((words 0)) |
| 953 | (save-excursion | 953 | (save-excursion |
| 954 | (save-restriction | 954 | (save-restriction |
| 955 | (narrow-to-region start end) | 955 | (narrow-to-region start end) |
| 956 | (goto-char (point-min)) | 956 | (goto-char (point-min)) |
| 957 | (while (forward-word 1) | 957 | (while (forward-word 1) |
| 958 | (setq count (1+ count))))) | 958 | (setq words (1+ words))))) |
| 959 | (when (called-interactively-p 'interactive) | 959 | (when (called-interactively-p 'interactive) |
| 960 | (message "%s has %d words" | 960 | (count-words--message "Region" |
| 961 | (if (use-region-p) "Region" "Buffer") | 961 | (count-lines start end) |
| 962 | count)) | 962 | words |
| 963 | count)) | 963 | (- end start))) |
| 964 | 964 | words)) | |
| 965 | (defun count-lines-region (start end) | 965 | |
| 966 | "Print number of lines and characters in the region." | 966 | (defun count-words () |
| 967 | (interactive "r") | 967 | "Display the number of lines, words, and characters in the buffer. |
| 968 | (message "Region has %d lines, %d characters" | 968 | In Transient Mark mode when the mark is active, display the |
| 969 | (count-lines start end) (- end start))) | 969 | number of lines, words, and characters in the region." |
| 970 | (interactive) | ||
| 971 | (if (use-region-p) | ||
| 972 | (call-interactively 'count-words-region) | ||
| 973 | (let* ((beg (point-min)) | ||
| 974 | (end (point-max)) | ||
| 975 | (lines (count-lines beg end)) | ||
| 976 | (words (count-words-region beg end)) | ||
| 977 | (chars (- end beg))) | ||
| 978 | (count-words--message "Buffer" lines words chars)))) | ||
| 979 | |||
| 980 | (defun count-words--message (str lines words chars) | ||
| 981 | (message "%s has %d line%s, %d word%s, and %d character%s." | ||
| 982 | str | ||
| 983 | lines (if (= lines 1) "" "s") | ||
| 984 | words (if (= words 1) "" "s") | ||
| 985 | chars (if (= chars 1) "" "s"))) | ||
| 986 | |||
| 987 | (defalias 'count-lines-region 'count-words-region) | ||
| 970 | 988 | ||
| 971 | (defun what-line () | 989 | (defun what-line () |
| 972 | "Print the current buffer line number and narrowed line number of point." | 990 | "Print the current buffer line number and narrowed line number of point." |
diff --git a/lisp/subr.el b/lisp/subr.el index 4946f3eef7a..05ac198dd13 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -552,7 +552,8 @@ AFTER should be a single event type--a symbol or a character, not a sequence. | |||
| 552 | 552 | ||
| 553 | Bindings are always added before any inherited map. | 553 | Bindings are always added before any inherited map. |
| 554 | 554 | ||
| 555 | The order of bindings in a keymap matters when it is used as a menu." | 555 | The order of bindings in a keymap only matters when it is used as |
| 556 | a menu, so this function is not useful for non-menu keymaps." | ||
| 556 | (unless after (setq after t)) | 557 | (unless after (setq after t)) |
| 557 | (or (keymapp keymap) | 558 | (or (keymapp keymap) |
| 558 | (signal 'wrong-type-argument (list 'keymapp keymap))) | 559 | (signal 'wrong-type-argument (list 'keymapp keymap))) |
| @@ -2170,7 +2171,7 @@ keyboard-quit events while waiting for a valid input." | |||
| 2170 | (setq prompt (propertize prompt 'face 'minibuffer-prompt))) | 2171 | (setq prompt (propertize prompt 'face 'minibuffer-prompt))) |
| 2171 | (setq char (let ((inhibit-quit inhibit-keyboard-quit)) | 2172 | (setq char (let ((inhibit-quit inhibit-keyboard-quit)) |
| 2172 | (read-key prompt))) | 2173 | (read-key prompt))) |
| 2173 | (and show-help (buffer-live-p helpbuf) | 2174 | (and show-help (buffer-live-p (get-buffer helpbuf)) |
| 2174 | (kill-buffer helpbuf)) | 2175 | (kill-buffer helpbuf)) |
| 2175 | (cond | 2176 | (cond |
| 2176 | ((not (numberp char))) | 2177 | ((not (numberp char))) |
diff --git a/lisp/window.el b/lisp/window.el index c6722a62c74..7241e148dae 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -1058,6 +1058,32 @@ windows nor the buffer list." | |||
| 1058 | (dolist (walk-windows-window (window-list-1 nil minibuf all-frames)) | 1058 | (dolist (walk-windows-window (window-list-1 nil minibuf all-frames)) |
| 1059 | (funcall proc walk-windows-window)))) | 1059 | (funcall proc walk-windows-window)))) |
| 1060 | 1060 | ||
| 1061 | (defun window-point-1 (&optional window) | ||
| 1062 | "Return value of WINDOW's point. | ||
| 1063 | WINDOW can be any live window and defaults to the selected one. | ||
| 1064 | |||
| 1065 | This function is like `window-point' with one exception: If | ||
| 1066 | WINDOW is selected, it returns the value of `point' of WINDOW's | ||
| 1067 | buffer regardless of whether that buffer is current or not." | ||
| 1068 | (setq window (window-normalize-live-window window)) | ||
| 1069 | (if (eq window (selected-window)) | ||
| 1070 | (with-current-buffer (window-buffer window) | ||
| 1071 | (point)) | ||
| 1072 | (window-point window))) | ||
| 1073 | |||
| 1074 | (defun set-window-point-1 (window pos) | ||
| 1075 | "Set value of WINDOW's point to POS. | ||
| 1076 | WINDOW can be any live window and defaults to the selected one. | ||
| 1077 | |||
| 1078 | This function is like `set-window-point' with one exception: If | ||
| 1079 | WINDOW is selected, it moves `point' of WINDOW's buffer to POS | ||
| 1080 | regardless of whether that buffer is current or not." | ||
| 1081 | (setq window (window-normalize-live-window window)) | ||
| 1082 | (if (eq window (selected-window)) | ||
| 1083 | (with-current-buffer (window-buffer window) | ||
| 1084 | (goto-char pos)) | ||
| 1085 | (set-window-point window pos))) | ||
| 1086 | |||
| 1061 | (defun window-in-direction-2 (window posn &optional horizontal) | 1087 | (defun window-in-direction-2 (window posn &optional horizontal) |
| 1062 | "Support function for `window-in-direction'." | 1088 | "Support function for `window-in-direction'." |
| 1063 | (if horizontal | 1089 | (if horizontal |
| @@ -1087,7 +1113,7 @@ IGNORE, when non-nil means a window can be returned even if its | |||
| 1087 | (last (+ first (if hor | 1113 | (last (+ first (if hor |
| 1088 | (window-total-width window) | 1114 | (window-total-width window) |
| 1089 | (window-total-height window)))) | 1115 | (window-total-height window)))) |
| 1090 | (posn-cons (nth 6 (posn-at-point (window-point window) window))) | 1116 | (posn-cons (nth 6 (posn-at-point (window-point-1 window) window))) |
| 1091 | ;; The column / row value of `posn-at-point' can be nil for the | 1117 | ;; The column / row value of `posn-at-point' can be nil for the |
| 1092 | ;; mini-window, guard against that. | 1118 | ;; mini-window, guard against that. |
| 1093 | (posn (if hor | 1119 | (posn (if hor |
| @@ -2492,7 +2518,7 @@ WINDOW must be a live window and defaults to the selected one." | |||
| 2492 | ;; Add an entry for buffer to WINDOW's previous buffers. | 2518 | ;; Add an entry for buffer to WINDOW's previous buffers. |
| 2493 | (with-current-buffer buffer | 2519 | (with-current-buffer buffer |
| 2494 | (let ((start (window-start window)) | 2520 | (let ((start (window-start window)) |
| 2495 | (point (window-point window))) | 2521 | (point (window-point-1 window))) |
| 2496 | (setq entry | 2522 | (setq entry |
| 2497 | (cons buffer | 2523 | (cons buffer |
| 2498 | (if entry | 2524 | (if entry |
| @@ -2534,10 +2560,7 @@ before was current this also makes BUFFER the current buffer." | |||
| 2534 | ;; Don't force window-start here (even if POINT is nil). | 2560 | ;; Don't force window-start here (even if POINT is nil). |
| 2535 | (set-window-start window start t)) | 2561 | (set-window-start window start t)) |
| 2536 | (when point | 2562 | (when point |
| 2537 | (if selected | 2563 | (set-window-point-1 window point)))) |
| 2538 | (with-current-buffer buffer | ||
| 2539 | (goto-char point)) | ||
| 2540 | (set-window-point window point))))) | ||
| 2541 | 2564 | ||
| 2542 | (defun switch-to-prev-buffer (&optional window bury-or-kill) | 2565 | (defun switch-to-prev-buffer (&optional window bury-or-kill) |
| 2543 | "In WINDOW switch to previous buffer. | 2566 | "In WINDOW switch to previous buffer. |
| @@ -2738,6 +2761,44 @@ the buffer `*scratch*', creating it if necessary." | |||
| 2738 | (set-buffer-major-mode scratch) | 2761 | (set-buffer-major-mode scratch) |
| 2739 | scratch))) | 2762 | scratch))) |
| 2740 | 2763 | ||
| 2764 | (defcustom frame-auto-hide-function #'iconify-frame | ||
| 2765 | "Function called to automatically hide frames. | ||
| 2766 | The function is called with one argument - a frame. | ||
| 2767 | |||
| 2768 | Functions affected by this option are those that bury a buffer | ||
| 2769 | shown in a separate frame like `quit-window' and `bury-buffer'." | ||
| 2770 | :type '(choice (const :tag "Iconify" iconify-frame) | ||
| 2771 | (const :tag "Delete" delete-frame) | ||
| 2772 | (const :tag "Do nothing" ignore) | ||
| 2773 | function) | ||
| 2774 | :group 'windows | ||
| 2775 | :group 'frames | ||
| 2776 | :version "24.1") | ||
| 2777 | |||
| 2778 | (defun window--delete (&optional window dedicated-only kill) | ||
| 2779 | "Delete WINDOW if possible. | ||
| 2780 | WINDOW must be a live window and defaults to the selected one. | ||
| 2781 | Optional argument DEDICATED-ONLY non-nil means to delete WINDOW | ||
| 2782 | only if it's dedicated to its buffer. Optional argument KILL | ||
| 2783 | means the buffer shown in window will be killed. Return non-nil | ||
| 2784 | if WINDOW gets deleted or its frame is auto-hidden." | ||
| 2785 | (setq window (window-normalize-live-window window)) | ||
| 2786 | (unless (and dedicated-only (not (window-dedicated-p window))) | ||
| 2787 | (let* ((buffer (window-buffer window)) | ||
| 2788 | (deletable (window-deletable-p window))) | ||
| 2789 | (cond | ||
| 2790 | ((eq deletable 'frame) | ||
| 2791 | (let ((frame (window-frame window))) | ||
| 2792 | (cond | ||
| 2793 | (kill | ||
| 2794 | (delete-frame frame)) | ||
| 2795 | ((functionp frame-auto-hide-function) | ||
| 2796 | (funcall frame-auto-hide-function frame)))) | ||
| 2797 | 'frame) | ||
| 2798 | (deletable | ||
| 2799 | (delete-window window) | ||
| 2800 | t))))) | ||
| 2801 | |||
| 2741 | (defun bury-buffer (&optional buffer-or-name) | 2802 | (defun bury-buffer (&optional buffer-or-name) |
| 2742 | "Put BUFFER-OR-NAME at the end of the list of all buffers. | 2803 | "Put BUFFER-OR-NAME at the end of the list of all buffers. |
| 2743 | There it is the least likely candidate for `other-buffer' to | 2804 | There it is the least likely candidate for `other-buffer' to |
| @@ -2758,14 +2819,11 @@ displayed there." | |||
| 2758 | ;; is shown in the selected window. | 2819 | ;; is shown in the selected window. |
| 2759 | (cond | 2820 | (cond |
| 2760 | ((or buffer-or-name (not (eq buffer (window-buffer))))) | 2821 | ((or buffer-or-name (not (eq buffer (window-buffer))))) |
| 2761 | ((not (window-dedicated-p)) | 2822 | ((window--delete nil t)) |
| 2762 | (switch-to-prev-buffer nil 'bury)) | 2823 | (t |
| 2763 | ((and (frame-root-window-p (selected-window)) | 2824 | ;; Switch to another buffer in window. |
| 2764 | ;; Don't iconify if it's the only frame. | 2825 | (set-window-dedicated-p nil nil) |
| 2765 | (not (eq (next-frame nil 0) (selected-frame)))) | 2826 | (switch-to-prev-buffer nil 'kill))) |
| 2766 | (iconify-frame (window-frame (selected-window)))) | ||
| 2767 | ((eq (window-deletable-p) t) | ||
| 2768 | (delete-window))) | ||
| 2769 | 2827 | ||
| 2770 | ;; Always return nil. | 2828 | ;; Always return nil. |
| 2771 | nil)) | 2829 | nil)) |
| @@ -2840,30 +2898,21 @@ frames left." | |||
| 2840 | BUFFER-OR-NAME may be a buffer or the name of an existing buffer | 2898 | BUFFER-OR-NAME may be a buffer or the name of an existing buffer |
| 2841 | and defaults to the current buffer. | 2899 | and defaults to the current buffer. |
| 2842 | 2900 | ||
| 2843 | When a window showing BUFFER-OR-NAME is either dedicated, or the | 2901 | When a window showing BUFFER-OR-NAME is dedicated, that window is |
| 2844 | window has no previous buffer, that window is deleted. If that | 2902 | deleted. If that window is the only window on its frame, the |
| 2845 | window is the only window on its frame, the frame is deleted too | 2903 | frame is deleted too when there are other frames left. If there |
| 2846 | when there are other frames left. If there are no other frames | 2904 | are no other frames left, some other buffer is displayed in that |
| 2847 | left, some other buffer is displayed in that window. | 2905 | window. |
| 2848 | 2906 | ||
| 2849 | This function removes the buffer denoted by BUFFER-OR-NAME from | 2907 | This function removes the buffer denoted by BUFFER-OR-NAME from |
| 2850 | all window-local buffer lists." | 2908 | all window-local buffer lists." |
| 2851 | (let ((buffer (window-normalize-buffer buffer-or-name))) | 2909 | (let ((buffer (window-normalize-buffer buffer-or-name))) |
| 2852 | (dolist (window (window-list-1 nil nil t)) | 2910 | (dolist (window (window-list-1 nil nil t)) |
| 2853 | (if (eq (window-buffer window) buffer) | 2911 | (if (eq (window-buffer window) buffer) |
| 2854 | (let ((deletable (and (window-dedicated-p window) | 2912 | (unless (window--delete window t t) |
| 2855 | (window-deletable-p window)))) | 2913 | ;; Switch to another buffer in window. |
| 2856 | (cond | 2914 | (set-window-dedicated-p window nil) |
| 2857 | ((eq deletable 'frame) | 2915 | (switch-to-prev-buffer window 'kill)) |
| 2858 | ;; Delete frame. | ||
| 2859 | (delete-frame (window-frame window))) | ||
| 2860 | (deletable | ||
| 2861 | ;; Delete window. | ||
| 2862 | (delete-window window)) | ||
| 2863 | (t | ||
| 2864 | ;; Switch to another buffer in window. | ||
| 2865 | (set-window-dedicated-p window nil) | ||
| 2866 | (switch-to-prev-buffer window 'kill)))) | ||
| 2867 | ;; Unrecord BUFFER in WINDOW. | 2916 | ;; Unrecord BUFFER in WINDOW. |
| 2868 | (unrecord-window-buffer window buffer))))) | 2917 | (unrecord-window-buffer window buffer))))) |
| 2869 | 2918 | ||
| @@ -2893,20 +2942,10 @@ one. If non-nil, reset `quit-restore' parameter to nil." | |||
| 2893 | quad resize) | 2942 | quad resize) |
| 2894 | (cond | 2943 | (cond |
| 2895 | ((and (not prev-buffer) | 2944 | ((and (not prev-buffer) |
| 2896 | (eq (nth 1 quit-restore) 'frame) | 2945 | (memq (nth 1 quit-restore) '(window frame)) |
| 2897 | (eq (window-deletable-p window) 'frame) | 2946 | (eq (nth 3 quit-restore) buffer) |
| 2898 | (eq (nth 3 quit-restore) buffer)) | 2947 | ;; Delete WINDOW if possible. |
| 2899 | ;; WINDOW's frame can be deleted. | 2948 | (window--delete window nil kill)) |
| 2900 | (delete-frame (window-frame window)) | ||
| 2901 | ;; If the previously selected window is still alive, select it. | ||
| 2902 | (when (window-live-p (nth 2 quit-restore)) | ||
| 2903 | (select-window (nth 2 quit-restore)))) | ||
| 2904 | ((and (not prev-buffer) | ||
| 2905 | (eq (nth 1 quit-restore) 'window) | ||
| 2906 | (eq (window-deletable-p window) t) | ||
| 2907 | (eq (nth 3 quit-restore) buffer)) | ||
| 2908 | ;; WINDOW can be deleted. | ||
| 2909 | (delete-window window) | ||
| 2910 | ;; If the previously selected window is still alive, select it. | 2949 | ;; If the previously selected window is still alive, select it. |
| 2911 | (when (window-live-p (nth 2 quit-restore)) | 2950 | (when (window-live-p (nth 2 quit-restore)) |
| 2912 | (select-window (nth 2 quit-restore)))) | 2951 | (select-window (nth 2 quit-restore)))) |
| @@ -3538,7 +3577,7 @@ specific buffers." | |||
| 3538 | ;; All buffer related things go in here - make the buffer | 3577 | ;; All buffer related things go in here - make the buffer |
| 3539 | ;; current when retrieving `point' and `mark'. | 3578 | ;; current when retrieving `point' and `mark'. |
| 3540 | (with-current-buffer (window-buffer window) | 3579 | (with-current-buffer (window-buffer window) |
| 3541 | (let ((point (if selected (point) (window-point window))) | 3580 | (let ((point (window-point-1 window)) |
| 3542 | (start (window-start window)) | 3581 | (start (window-start window)) |
| 3543 | (mark (mark))) | 3582 | (mark (mark))) |
| 3544 | (window-list-no-nils | 3583 | (window-list-no-nils |
| @@ -3833,14 +3872,7 @@ element is BUFFER." | |||
| 3833 | (list 'other | 3872 | (list 'other |
| 3834 | ;; A quadruple of WINDOW's buffer, start, point and height. | 3873 | ;; A quadruple of WINDOW's buffer, start, point and height. |
| 3835 | (list (window-buffer window) (window-start window) | 3874 | (list (window-buffer window) (window-start window) |
| 3836 | (if (eq window (selected-window)) | 3875 | (window-point-1 window) (window-total-size window)) |
| 3837 | ;; When WINDOW is the selected window use its | ||
| 3838 | ;; buffer's `point' instead of `window-point' | ||
| 3839 | ;; (Bug#9626). | ||
| 3840 | (with-current-buffer (window-buffer window) | ||
| 3841 | (point)) | ||
| 3842 | (window-point window)) | ||
| 3843 | (window-total-size window)) | ||
| 3844 | (selected-window) buffer)))) | 3876 | (selected-window) buffer)))) |
| 3845 | ((eq type 'window) | 3877 | ((eq type 'window) |
| 3846 | ;; WINDOW has been created on an existing frame. | 3878 | ;; WINDOW has been created on an existing frame. |
| @@ -3927,12 +3959,10 @@ Finally, an element of this list can be also specified as | |||
| 3927 | \(BUFFER-NAME FUNCTION OTHER-ARGS). In that case, | 3959 | \(BUFFER-NAME FUNCTION OTHER-ARGS). In that case, |
| 3928 | `special-display-popup-frame' will call FUNCTION with the buffer | 3960 | `special-display-popup-frame' will call FUNCTION with the buffer |
| 3929 | named BUFFER-NAME as first argument, and OTHER-ARGS as the | 3961 | named BUFFER-NAME as first argument, and OTHER-ARGS as the |
| 3930 | second. If `special-display-function' specifies some other | 3962 | second. |
| 3931 | function, that function is called with the buffer named | 3963 | |
| 3932 | BUFFER-NAME as first, and the element's cdr as second argument. | 3964 | Any alternative function specified here is responsible for |
| 3933 | In any case, that function is responsible for setting the value | 3965 | setting up the quit-restore parameter of the window used. |
| 3934 | The function specified here is responsible for setting the | ||
| 3935 | quit-restore and help-setup parameters of the window used. | ||
| 3936 | 3966 | ||
| 3937 | If this variable appears \"not to work\", because you added a | 3967 | If this variable appears \"not to work\", because you added a |
| 3938 | name to it but the corresponding buffer is displayed in the | 3968 | name to it but the corresponding buffer is displayed in the |
| @@ -3997,10 +4027,10 @@ as second argument. | |||
| 3997 | Finally, an element of this list can be also specified as | 4027 | Finally, an element of this list can be also specified as |
| 3998 | \(REGEXP FUNCTION OTHER-ARGS). `special-display-popup-frame' | 4028 | \(REGEXP FUNCTION OTHER-ARGS). `special-display-popup-frame' |
| 3999 | will then call FUNCTION with the buffer whose name matched | 4029 | will then call FUNCTION with the buffer whose name matched |
| 4000 | REGEXP as first, and OTHER-ARGS as second argument. If | 4030 | REGEXP as first, and OTHER-ARGS as second argument. |
| 4001 | `special-display-function' specifies some other function, that | 4031 | |
| 4002 | function is called with the buffer whose name matched REGEXP | 4032 | Any alternative function specified here is responsible for |
| 4003 | as first, and the element's cdr as second argument. | 4033 | setting up the quit-restore parameter of the window used. |
| 4004 | 4034 | ||
| 4005 | If this variable appears \"not to work\", because you added a | 4035 | If this variable appears \"not to work\", because you added a |
| 4006 | name to it but the corresponding buffer is displayed in the | 4036 | name to it but the corresponding buffer is displayed in the |
| @@ -4748,7 +4778,7 @@ return the window used; otherwise return nil." | |||
| 4748 | (setq frame (funcall fun)) | 4778 | (setq frame (funcall fun)) |
| 4749 | (setq window (frame-selected-window frame))) | 4779 | (setq window (frame-selected-window frame))) |
| 4750 | (display-buffer-record-window 'frame window buffer) | 4780 | (display-buffer-record-window 'frame window buffer) |
| 4751 | (window--display-buffer-2 buffer window) | 4781 | (window--display-buffer-2 buffer window display-buffer-mark-dedicated) |
| 4752 | ;; Reset list of WINDOW's previous buffers to nil. | 4782 | ;; Reset list of WINDOW's previous buffers to nil. |
| 4753 | (set-window-prev-buffers window nil) | 4783 | (set-window-prev-buffers window nil) |
| 4754 | window))) | 4784 | window))) |
| @@ -4774,7 +4804,7 @@ If sucessful, return the new window; otherwise return nil." | |||
| 4774 | (window--try-to-split-window | 4804 | (window--try-to-split-window |
| 4775 | (get-lru-window frame t))))) | 4805 | (get-lru-window frame t))))) |
| 4776 | (display-buffer-record-window 'window window buffer) | 4806 | (display-buffer-record-window 'window window buffer) |
| 4777 | (window--display-buffer-2 buffer window) | 4807 | (window--display-buffer-2 buffer window display-buffer-mark-dedicated) |
| 4778 | ;; Reset list of WINDOW's previous buffers to nil. | 4808 | ;; Reset list of WINDOW's previous buffers to nil. |
| 4779 | (set-window-prev-buffers window nil) | 4809 | (set-window-prev-buffers window nil) |
| 4780 | window))) | 4810 | window))) |
| @@ -4946,7 +4976,7 @@ one. | |||
| 4946 | If FORCE-SAME-WINDOW is non-nil, BUFFER-OR-NAME must be displayed | 4976 | If FORCE-SAME-WINDOW is non-nil, BUFFER-OR-NAME must be displayed |
| 4947 | in the selected window; signal an error if that is | 4977 | in the selected window; signal an error if that is |
| 4948 | impossible (e.g. if the selected window is minibuffer-only). If | 4978 | impossible (e.g. if the selected window is minibuffer-only). If |
| 4949 | non-nil, BUFFER-OR-NAME may be displayed in another window. | 4979 | nil, BUFFER-OR-NAME may be displayed in another window. |
| 4950 | 4980 | ||
| 4951 | Return the buffer switched to." | 4981 | Return the buffer switched to." |
| 4952 | (interactive | 4982 | (interactive |
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index 04234bb6ef3..03cedf70af8 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 | |||
| @@ -79,9 +79,9 @@ AC_DEFUN([gl_EARLY], | |||
| 79 | # Code from module stdarg: | 79 | # Code from module stdarg: |
| 80 | dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode | 80 | dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode |
| 81 | dnl for the builtin va_copy to work. With Autoconf 2.60 or later, | 81 | dnl for the builtin va_copy to work. With Autoconf 2.60 or later, |
| 82 | dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC | 82 | dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99 |
| 83 | dnl shouldn't hurt, though installers are on their own to set c99 mode. | 83 | dnl shouldn't hurt, though installers are on their own to set c99 mode. |
| 84 | AC_REQUIRE([AC_PROG_CC_STDC]) | 84 | gl_PROG_CC_C99 |
| 85 | # Code from module stdbool: | 85 | # Code from module stdbool: |
| 86 | # Code from module stddef: | 86 | # Code from module stddef: |
| 87 | # Code from module stdint: | 87 | # Code from module stdint: |
| @@ -246,12 +246,6 @@ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then | |||
| 246 | fi | 246 | fi |
| 247 | gl_SIGNAL_MODULE_INDICATOR([sigprocmask]) | 247 | gl_SIGNAL_MODULE_INDICATOR([sigprocmask]) |
| 248 | gl_gnulib_enabled_sigprocmask=true | 248 | gl_gnulib_enabled_sigprocmask=true |
| 249 | if $condition; then | ||
| 250 | func_gl_gnulib_m4code_raise | ||
| 251 | fi | ||
| 252 | if $condition; then | ||
| 253 | func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616 | ||
| 254 | fi | ||
| 255 | fi | 249 | fi |
| 256 | } | 250 | } |
| 257 | func_gl_gnulib_m4code_stat () | 251 | func_gl_gnulib_m4code_stat () |
| @@ -264,13 +258,10 @@ if test $REPLACE_STAT = 1; then | |||
| 264 | fi | 258 | fi |
| 265 | gl_SYS_STAT_MODULE_INDICATOR([stat]) | 259 | gl_SYS_STAT_MODULE_INDICATOR([stat]) |
| 266 | gl_gnulib_enabled_stat=true | 260 | gl_gnulib_enabled_stat=true |
| 267 | if $condition; then | 261 | if test $REPLACE_STAT = 1; then |
| 268 | func_gl_gnulib_m4code_dosname | 262 | func_gl_gnulib_m4code_dosname |
| 269 | fi | 263 | fi |
| 270 | if $condition; then | 264 | if test $REPLACE_STAT = 1; then |
| 271 | func_gl_gnulib_m4code_pathmax | ||
| 272 | fi | ||
| 273 | if $condition; then | ||
| 274 | func_gl_gnulib_m4code_verify | 265 | func_gl_gnulib_m4code_verify |
| 275 | fi | 266 | fi |
| 276 | fi | 267 | fi |
| @@ -305,12 +296,6 @@ gl_STDLIB_MODULE_INDICATOR([strtoull]) | |||
| 305 | gl_gnulib_enabled_verify=true | 296 | gl_gnulib_enabled_verify=true |
| 306 | fi | 297 | fi |
| 307 | } | 298 | } |
| 308 | if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then | ||
| 309 | func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616 | ||
| 310 | fi | ||
| 311 | if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then | ||
| 312 | func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07 | ||
| 313 | fi | ||
| 314 | if test $REPLACE_GETOPT = 1; then | 299 | if test $REPLACE_GETOPT = 1; then |
| 315 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 | 300 | func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 |
| 316 | fi | 301 | fi |
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 8fc448fdc8f..7d832999591 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # gnulib-common.m4 serial 30 | 1 | # gnulib-common.m4 serial 31 |
| 2 | dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -211,6 +211,29 @@ m4_ifndef([AS_VAR_IF], | |||
| 211 | [m4_define([AS_VAR_IF], | 211 | [m4_define([AS_VAR_IF], |
| 212 | [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) | 212 | [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) |
| 213 | 213 | ||
| 214 | # gl_PROG_CC_C99 | ||
| 215 | # Modifies the value of the shell variable CC in an attempt to make $CC | ||
| 216 | # understand ISO C99 source code. | ||
| 217 | # This is like AC_PROG_CC_C99, except that | ||
| 218 | # - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, | ||
| 219 | # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC | ||
| 220 | # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>, | ||
| 221 | # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 | ||
| 222 | # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>. | ||
| 223 | # Remaining problems: | ||
| 224 | # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options | ||
| 225 | # to CC twice | ||
| 226 | # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>. | ||
| 227 | # - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard. | ||
| 228 | AC_DEFUN([gl_PROG_CC_C99], | ||
| 229 | [ | ||
| 230 | dnl Change that version number to the minimum Autoconf version that supports | ||
| 231 | dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. | ||
| 232 | m4_version_prereq([9.0], | ||
| 233 | [AC_REQUIRE([AC_PROG_CC_C99])], | ||
| 234 | [AC_REQUIRE([AC_PROG_CC_STDC])]) | ||
| 235 | ]) | ||
| 236 | |||
| 214 | # gl_PROG_AR_RANLIB | 237 | # gl_PROG_AR_RANLIB |
| 215 | # Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. | 238 | # Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. |
| 216 | # The user can set the variables AR, ARFLAGS, RANLIB if he wants to override | 239 | # The user can set the variables AR, ARFLAGS, RANLIB if he wants to override |
diff --git a/src/ChangeLog b/src/ChangeLog index bc9ffc8f3fe..9cef045c029 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,41 @@ | |||
| 1 | 2011-10-08 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * callint.c (Fcall_interactively): Give a more explicit error for the | ||
| 4 | 'c' case with a non-character input. (Bug#8479) | ||
| 5 | |||
| 6 | 2011-10-08 Eli Zaretskii <eliz@gnu.org> | ||
| 7 | |||
| 8 | * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left | ||
| 9 | lines. | ||
| 10 | (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L | ||
| 11 | lines that are hscrolled on the left. | ||
| 12 | |||
| 13 | * dispnew.c (buffer_posn_from_coords): Account for a possible | ||
| 14 | presence of header-line. (Bug#4426) | ||
| 15 | |||
| 16 | 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 17 | |||
| 18 | * buffer.c (syms_of_buffer) <enable-multibyte-characters>: Don't | ||
| 19 | advertise functionality which we discourage or doesn't work. | ||
| 20 | |||
| 21 | 2011-10-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 22 | |||
| 23 | * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__ | ||
| 24 | or sizeof. __alignof__ gives the wrong answer on Fedora x86-64 | ||
| 25 | with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int; | ||
| 26 | this makes Emacs dump core during garbage collection on rare | ||
| 27 | occasions. sizeof is obviously inferior to offsetof here, so | ||
| 28 | stick with offsetof. | ||
| 29 | (GC_POINTER_ALIGNMENT): New macro. | ||
| 30 | (mark_memory): Omit 3rd (offset) arg; caller changed. | ||
| 31 | Don't assume EMACS_INT alignment is the same as pointer alignment. | ||
| 32 | |||
| 33 | 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 34 | |||
| 35 | * keyboard.c (read_key_sequence_remapped): New var. | ||
| 36 | (read_key_sequence): Compute remapping in the right buffer. | ||
| 37 | (command_loop_1): Use read_key_sequence's remapping directly. | ||
| 38 | |||
| 1 | 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca> | 39 | 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 40 | ||
| 3 | * dired.c (file_name_completion): Don't expand file name. | 41 | * dired.c (file_name_completion): Don't expand file name. |
| @@ -124,8 +162,8 @@ | |||
| 124 | 162 | ||
| 125 | 2011-09-24 Eli Zaretskii <eliz@gnu.org> | 163 | 2011-09-24 Eli Zaretskii <eliz@gnu.org> |
| 126 | 164 | ||
| 127 | * dispnew.c (syms_of_display) <redisplay-dont-pause>: Default | 165 | * dispnew.c (syms_of_display) <redisplay-dont-pause>: |
| 128 | value is now t. Doc fix. | 166 | Default value is now t. Doc fix. |
| 129 | 167 | ||
| 130 | * indent.c (Fvertical_motion): Compute and apply the overshoot | 168 | * indent.c (Fvertical_motion): Compute and apply the overshoot |
| 131 | logic when moving up, not only when moving down. Fix the | 169 | logic when moving up, not only when moving down. Fix the |
| @@ -141,8 +179,8 @@ | |||
| 141 | 179 | ||
| 142 | * dbusbind.c (Fdbus_register_signal): Add match rule to | 180 | * dbusbind.c (Fdbus_register_signal): Add match rule to |
| 143 | Vdbus_registered_objects_table. (Bug#9581) | 181 | Vdbus_registered_objects_table. (Bug#9581) |
| 144 | (Fdbus_register_method, Vdbus_registered_objects_table): Fix | 182 | (Fdbus_register_method, Vdbus_registered_objects_table): |
| 145 | docstring. | 183 | Fix docstring. |
| 146 | 184 | ||
| 147 | 2011-09-24 Jim Meyering <meyering@redhat.com> | 185 | 2011-09-24 Jim Meyering <meyering@redhat.com> |
| 148 | 186 | ||
| @@ -622,15 +660,15 @@ | |||
| 622 | * term.c (tty_append_glyph): New function. | 660 | * term.c (tty_append_glyph): New function. |
| 623 | (produce_stretch_glyph): Static function and its prototype deleted. | 661 | (produce_stretch_glyph): Static function and its prototype deleted. |
| 624 | 662 | ||
| 625 | * dispextern.h (produce_stretch_glyph, tty_append_glyph): Add | 663 | * dispextern.h (produce_stretch_glyph, tty_append_glyph): |
| 626 | prototypes. | 664 | Add prototypes. |
| 627 | 665 | ||
| 628 | 2011-08-29 Paul Eggert <eggert@cs.ucla.edu> | 666 | 2011-08-29 Paul Eggert <eggert@cs.ucla.edu> |
| 629 | 667 | ||
| 630 | * image.c (parse_image_spec): Check for nonnegative, not for positive, | 668 | * image.c (parse_image_spec): Check for nonnegative, not for positive, |
| 631 | when checking :margin (Bug#9390). | 669 | when checking :margin (Bug#9390). |
| 632 | (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR): | 670 | (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR): |
| 633 | Renamed from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, | 671 | Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, |
| 634 | so that the name doesn't mislead. All uses changed. | 672 | so that the name doesn't mislead. All uses changed. |
| 635 | 673 | ||
| 636 | 2011-08-28 Johan Bockgård <bojohan@gnu.org> | 674 | 2011-08-28 Johan Bockgård <bojohan@gnu.org> |
| @@ -832,8 +870,8 @@ | |||
| 832 | (read_char_minibuf_menu_prompt, follow_key, read_key_sequence): | 870 | (read_char_minibuf_menu_prompt, follow_key, read_key_sequence): |
| 833 | Use ptrdiff_t, not int, to count maps. | 871 | Use ptrdiff_t, not int, to count maps. |
| 834 | (read_char_minibuf_menu_prompt): Check for overflow in size | 872 | (read_char_minibuf_menu_prompt): Check for overflow in size |
| 835 | calculations. Don't update size until allocation succeeds. Redo | 873 | calculations. Don't update size until allocation succeeds. |
| 836 | calculations to avoid overflow. | 874 | Redo calculations to avoid overflow. |
| 837 | * keyboard.h: Change prototypes to match the above. | 875 | * keyboard.h: Change prototypes to match the above. |
| 838 | 876 | ||
| 839 | * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int, | 877 | * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int, |
| @@ -1002,7 +1040,7 @@ | |||
| 1002 | * indent.c (MULTIBYTE_BYTES_WIDTH): | 1040 | * indent.c (MULTIBYTE_BYTES_WIDTH): |
| 1003 | Use sanitize_char_width to avoid undefined and/or bad behavior | 1041 | Use sanitize_char_width to avoid undefined and/or bad behavior |
| 1004 | with outlandish widths. | 1042 | with outlandish widths. |
| 1005 | * character.h (sanitize_tab_width): Renamed from sanitize_width, | 1043 | * character.h (sanitize_tab_width): Rename from sanitize_width, |
| 1006 | now that we have two such functions. All uses changed. | 1044 | now that we have two such functions. All uses changed. |
| 1007 | (sanitize_char_width): New inline function. | 1045 | (sanitize_char_width): New inline function. |
| 1008 | 1046 | ||
| @@ -1068,8 +1106,8 @@ | |||
| 1068 | (png_load, gif_load, svg_load_image): | 1106 | (png_load, gif_load, svg_load_image): |
| 1069 | Prefer int to unsigned where either will do. | 1107 | Prefer int to unsigned where either will do. |
| 1070 | (tiff_handler): New function, combining the cores of the | 1108 | (tiff_handler): New function, combining the cores of the |
| 1071 | old tiff_error_handler and tiff_warning_handler. This | 1109 | old tiff_error_handler and tiff_warning_handler. |
| 1072 | function is rewritten to use vsnprintf and thereby avoid | 1110 | This function is rewritten to use vsnprintf and thereby avoid |
| 1073 | stack buffer overflows. It uses only the features of vsnprintf | 1111 | stack buffer overflows. It uses only the features of vsnprintf |
| 1074 | that are common to both POSIX and native Microsoft. | 1112 | that are common to both POSIX and native Microsoft. |
| 1075 | (tiff_error_handler, tiff_warning_handler): Use it. | 1113 | (tiff_error_handler, tiff_warning_handler): Use it. |
| @@ -1098,8 +1136,8 @@ | |||
| 1098 | `(space ...)', and specifies display in the text area, return 2 | 1136 | `(space ...)', and specifies display in the text area, return 2 |
| 1099 | rather than 1. | 1137 | rather than 1. |
| 1100 | (try_cursor_movement): Check for the need to scroll more | 1138 | (try_cursor_movement): Check for the need to scroll more |
| 1101 | accurately, and prefer exact match for point under bidi. Don't | 1139 | accurately, and prefer exact match for point under bidi. |
| 1102 | advance `row' beyond the last row of the window. | 1140 | Don't advance `row' beyond the last row of the window. |
| 1103 | 1141 | ||
| 1104 | * dispextern.h (struct bidi_it): Rename the disp_prop_p member | 1142 | * dispextern.h (struct bidi_it): Rename the disp_prop_p member |
| 1105 | into disp_prop; all users changed. | 1143 | into disp_prop; all users changed. |
diff --git a/src/alloc.c b/src/alloc.c index ead5c8a8ca4..09ef4b085df 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -393,7 +393,7 @@ static int live_symbol_p (struct mem_node *, void *); | |||
| 393 | static int live_float_p (struct mem_node *, void *); | 393 | static int live_float_p (struct mem_node *, void *); |
| 394 | static int live_misc_p (struct mem_node *, void *); | 394 | static int live_misc_p (struct mem_node *, void *); |
| 395 | static void mark_maybe_object (Lisp_Object); | 395 | static void mark_maybe_object (Lisp_Object); |
| 396 | static void mark_memory (void *, void *, int); | 396 | static void mark_memory (void *, void *); |
| 397 | static void mem_init (void); | 397 | static void mem_init (void); |
| 398 | static struct mem_node *mem_insert (void *, void *, enum mem_type); | 398 | static struct mem_node *mem_insert (void *, void *, enum mem_type); |
| 399 | static void mem_insert_fixup (struct mem_node *); | 399 | static void mem_insert_fixup (struct mem_node *); |
| @@ -4235,14 +4235,25 @@ mark_maybe_pointer (void *p) | |||
| 4235 | } | 4235 | } |
| 4236 | 4236 | ||
| 4237 | 4237 | ||
| 4238 | /* Alignment of Lisp_Object and pointer values. Use offsetof, as it | ||
| 4239 | sometimes returns a smaller alignment than GCC's __alignof__ and | ||
| 4240 | mark_memory might miss objects if __alignof__ were used. For | ||
| 4241 | example, on x86 with WIDE_EMACS_INT, __alignof__ (Lisp_Object) is 8 | ||
| 4242 | but GC_LISP_OBJECT_ALIGNMENT should be 4. */ | ||
| 4243 | #ifndef GC_LISP_OBJECT_ALIGNMENT | ||
| 4244 | # define GC_LISP_OBJECT_ALIGNMENT offsetof (struct {char a; Lisp_Object b;}, b) | ||
| 4245 | #endif | ||
| 4246 | #define GC_POINTER_ALIGNMENT offsetof (struct {char a; void *b;}, b) | ||
| 4247 | |||
| 4238 | /* Mark Lisp objects referenced from the address range START+OFFSET..END | 4248 | /* Mark Lisp objects referenced from the address range START+OFFSET..END |
| 4239 | or END+OFFSET..START. */ | 4249 | or END+OFFSET..START. */ |
| 4240 | 4250 | ||
| 4241 | static void | 4251 | static void |
| 4242 | mark_memory (void *start, void *end, int offset) | 4252 | mark_memory (void *start, void *end) |
| 4243 | { | 4253 | { |
| 4244 | Lisp_Object *p; | 4254 | Lisp_Object *p; |
| 4245 | void **pp; | 4255 | void **pp; |
| 4256 | int i; | ||
| 4246 | 4257 | ||
| 4247 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES | 4258 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES |
| 4248 | nzombies = 0; | 4259 | nzombies = 0; |
| @@ -4258,8 +4269,9 @@ mark_memory (void *start, void *end, int offset) | |||
| 4258 | } | 4269 | } |
| 4259 | 4270 | ||
| 4260 | /* Mark Lisp_Objects. */ | 4271 | /* Mark Lisp_Objects. */ |
| 4261 | for (p = (Lisp_Object *) ((char *) start + offset); (void *) p < end; ++p) | 4272 | for (p = start; (void *) p < end; p++) |
| 4262 | mark_maybe_object (*p); | 4273 | for (i = 0; i < sizeof *p; i += GC_LISP_OBJECT_ALIGNMENT) |
| 4274 | mark_maybe_object (*(Lisp_Object *) ((char *) p + i)); | ||
| 4263 | 4275 | ||
| 4264 | /* Mark Lisp data pointed to. This is necessary because, in some | 4276 | /* Mark Lisp data pointed to. This is necessary because, in some |
| 4265 | situations, the C compiler optimizes Lisp objects away, so that | 4277 | situations, the C compiler optimizes Lisp objects away, so that |
| @@ -4279,8 +4291,9 @@ mark_memory (void *start, void *end, int offset) | |||
| 4279 | away. The only reference to the life string is through the | 4291 | away. The only reference to the life string is through the |
| 4280 | pointer `s'. */ | 4292 | pointer `s'. */ |
| 4281 | 4293 | ||
| 4282 | for (pp = (void **) ((char *) start + offset); (void *) pp < end; ++pp) | 4294 | for (pp = start; (void *) pp < end; pp++) |
| 4283 | mark_maybe_pointer (*pp); | 4295 | for (i = 0; i < sizeof *pp; i += GC_POINTER_ALIGNMENT) |
| 4296 | mark_maybe_pointer (*(void **) ((char *) pp + i)); | ||
| 4284 | } | 4297 | } |
| 4285 | 4298 | ||
| 4286 | /* setjmp will work with GCC unless NON_SAVING_SETJMP is defined in | 4299 | /* setjmp will work with GCC unless NON_SAVING_SETJMP is defined in |
| @@ -4454,15 +4467,11 @@ dump_zombies (void) | |||
| 4454 | pass starting at the start of the stack + 2. Likewise, if the | 4467 | pass starting at the start of the stack + 2. Likewise, if the |
| 4455 | minimal alignment of Lisp_Objects on the stack is 1, four passes | 4468 | minimal alignment of Lisp_Objects on the stack is 1, four passes |
| 4456 | would be necessary, each one starting with one byte more offset | 4469 | would be necessary, each one starting with one byte more offset |
| 4457 | from the stack start. | 4470 | from the stack start. */ |
| 4458 | |||
| 4459 | The current code assumes by default that Lisp_Objects are aligned | ||
| 4460 | equally on the stack. */ | ||
| 4461 | 4471 | ||
| 4462 | static void | 4472 | static void |
| 4463 | mark_stack (void) | 4473 | mark_stack (void) |
| 4464 | { | 4474 | { |
| 4465 | int i; | ||
| 4466 | void *end; | 4475 | void *end; |
| 4467 | 4476 | ||
| 4468 | #ifdef HAVE___BUILTIN_UNWIND_INIT | 4477 | #ifdef HAVE___BUILTIN_UNWIND_INIT |
| @@ -4520,15 +4529,8 @@ mark_stack (void) | |||
| 4520 | /* This assumes that the stack is a contiguous region in memory. If | 4529 | /* This assumes that the stack is a contiguous region in memory. If |
| 4521 | that's not the case, something has to be done here to iterate | 4530 | that's not the case, something has to be done here to iterate |
| 4522 | over the stack segments. */ | 4531 | over the stack segments. */ |
| 4523 | #ifndef GC_LISP_OBJECT_ALIGNMENT | 4532 | mark_memory (stack_base, end); |
| 4524 | #ifdef __GNUC__ | 4533 | |
| 4525 | #define GC_LISP_OBJECT_ALIGNMENT __alignof__ (Lisp_Object) | ||
| 4526 | #else | ||
| 4527 | #define GC_LISP_OBJECT_ALIGNMENT sizeof (Lisp_Object) | ||
| 4528 | #endif | ||
| 4529 | #endif | ||
| 4530 | for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT) | ||
| 4531 | mark_memory (stack_base, end, i); | ||
| 4532 | /* Allow for marking a secondary stack, like the register stack on the | 4534 | /* Allow for marking a secondary stack, like the register stack on the |
| 4533 | ia64. */ | 4535 | ia64. */ |
| 4534 | #ifdef GC_MARK_SECONDARY_STACK | 4536 | #ifdef GC_MARK_SECONDARY_STACK |
diff --git a/src/buffer.c b/src/buffer.c index f38c9a739a6..fdf006a41eb 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5448,9 +5448,7 @@ file I/O and the behavior of various editing commands. | |||
| 5448 | 5448 | ||
| 5449 | This variable is buffer-local but you cannot set it directly; | 5449 | This variable is buffer-local but you cannot set it directly; |
| 5450 | use the function `set-buffer-multibyte' to change a buffer's representation. | 5450 | use the function `set-buffer-multibyte' to change a buffer's representation. |
| 5451 | Changing its default value with `setq-default' is supported. | 5451 | See also Info node `(elisp)Text Representations'. */); |
| 5452 | See also variable `default-enable-multibyte-characters' and Info node | ||
| 5453 | `(elisp)Text Representations'. */); | ||
| 5454 | XSYMBOL (intern_c_string ("enable-multibyte-characters"))->constant = 1; | 5452 | XSYMBOL (intern_c_string ("enable-multibyte-characters"))->constant = 1; |
| 5455 | 5453 | ||
| 5456 | DEFVAR_PER_BUFFER ("buffer-file-coding-system", | 5454 | DEFVAR_PER_BUFFER ("buffer-file-coding-system", |
diff --git a/src/callint.c b/src/callint.c index 5cf99495671..61ab4a3963e 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -535,6 +535,8 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 535 | message1_nolog ((char *) 0); | 535 | message1_nolog ((char *) 0); |
| 536 | /* Passing args[i] directly stimulates compiler bug */ | 536 | /* Passing args[i] directly stimulates compiler bug */ |
| 537 | teml = args[i]; | 537 | teml = args[i]; |
| 538 | /* See bug#8479. */ | ||
| 539 | if (! CHARACTERP (teml)) error ("Non-character input-event"); | ||
| 538 | visargs[i] = Fchar_to_string (teml); | 540 | visargs[i] = Fchar_to_string (teml); |
| 539 | break; | 541 | break; |
| 540 | 542 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index ccb24c8ceea..879ff88ff14 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5274,6 +5274,10 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5274 | CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp))); | 5274 | CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp))); |
| 5275 | BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp))); | 5275 | BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp))); |
| 5276 | start_display (&it, w, startp); | 5276 | start_display (&it, w, startp); |
| 5277 | /* start_display takes into account the header-line row, but IT's | ||
| 5278 | vpos still counts from the glyph row that includes the window's | ||
| 5279 | start position. Adjust for a possible header-line row. */ | ||
| 5280 | it.vpos += WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0; | ||
| 5277 | 5281 | ||
| 5278 | x0 = *x; | 5282 | x0 = *x; |
| 5279 | 5283 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index b266da07a42..a21008b9502 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -252,6 +252,7 @@ static Lisp_Object Qtimer_event_handler; | |||
| 252 | /* read_key_sequence stores here the command definition of the | 252 | /* read_key_sequence stores here the command definition of the |
| 253 | key sequence that it reads. */ | 253 | key sequence that it reads. */ |
| 254 | static Lisp_Object read_key_sequence_cmd; | 254 | static Lisp_Object read_key_sequence_cmd; |
| 255 | static Lisp_Object read_key_sequence_remapped; | ||
| 255 | 256 | ||
| 256 | static Lisp_Object Qinput_method_function; | 257 | static Lisp_Object Qinput_method_function; |
| 257 | 258 | ||
| @@ -1517,14 +1518,10 @@ command_loop_1 (void) | |||
| 1517 | reset it before we execute the command. */ | 1518 | reset it before we execute the command. */ |
| 1518 | Vdeactivate_mark = Qnil; | 1519 | Vdeactivate_mark = Qnil; |
| 1519 | 1520 | ||
| 1520 | /* Remap command through active keymaps */ | 1521 | /* Remap command through active keymaps. */ |
| 1521 | Vthis_original_command = cmd; | 1522 | Vthis_original_command = cmd; |
| 1522 | if (SYMBOLP (cmd)) | 1523 | if (!NILP (read_key_sequence_remapped)) |
| 1523 | { | 1524 | cmd = read_key_sequence_remapped; |
| 1524 | Lisp_Object cmd1; | ||
| 1525 | if (cmd1 = Fcommand_remapping (cmd, Qnil, Qnil), !NILP (cmd1)) | ||
| 1526 | cmd = cmd1; | ||
| 1527 | } | ||
| 1528 | 1525 | ||
| 1529 | /* Execute the command. */ | 1526 | /* Execute the command. */ |
| 1530 | 1527 | ||
| @@ -10015,6 +10012,13 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 10015 | read_key_sequence_cmd = (first_binding < nmaps | 10012 | read_key_sequence_cmd = (first_binding < nmaps |
| 10016 | ? defs[first_binding] | 10013 | ? defs[first_binding] |
| 10017 | : Qnil); | 10014 | : Qnil); |
| 10015 | read_key_sequence_remapped | ||
| 10016 | /* Remap command through active keymaps. | ||
| 10017 | Do the remapping here, before the unbind_to so it uses the keymaps | ||
| 10018 | of the appropriate buffer. */ | ||
| 10019 | = SYMBOLP (read_key_sequence_cmd) | ||
| 10020 | ? Fcommand_remapping (read_key_sequence_cmd, Qnil, Qnil) | ||
| 10021 | : Qnil; | ||
| 10018 | 10022 | ||
| 10019 | unread_switch_frame = delayed_switch_frame; | 10023 | unread_switch_frame = delayed_switch_frame; |
| 10020 | unbind_to (count, Qnil); | 10024 | unbind_to (count, Qnil); |
| @@ -11683,6 +11687,8 @@ syms_of_keyboard (void) | |||
| 11683 | 11687 | ||
| 11684 | read_key_sequence_cmd = Qnil; | 11688 | read_key_sequence_cmd = Qnil; |
| 11685 | staticpro (&read_key_sequence_cmd); | 11689 | staticpro (&read_key_sequence_cmd); |
| 11690 | read_key_sequence_remapped = Qnil; | ||
| 11691 | staticpro (&read_key_sequence_remapped); | ||
| 11686 | 11692 | ||
| 11687 | menu_bar_one_keymap_changed_items = Qnil; | 11693 | menu_bar_one_keymap_changed_items = Qnil; |
| 11688 | staticpro (&menu_bar_one_keymap_changed_items); | 11694 | staticpro (&menu_bar_one_keymap_changed_items); |
diff --git a/src/xdisp.c b/src/xdisp.c index 9e26360394c..9ec7463c555 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12119,6 +12119,7 @@ hscroll_window_tree (Lisp_Object window) | |||
| 12119 | = (desired_cursor_row->enabled_p | 12119 | = (desired_cursor_row->enabled_p |
| 12120 | ? desired_cursor_row | 12120 | ? desired_cursor_row |
| 12121 | : current_cursor_row); | 12121 | : current_cursor_row); |
| 12122 | int row_r2l_p = cursor_row->reversed_p; | ||
| 12122 | 12123 | ||
| 12123 | text_area_width = window_box_width (w, TEXT_AREA); | 12124 | text_area_width = window_box_width (w, TEXT_AREA); |
| 12124 | 12125 | ||
| @@ -12126,11 +12127,31 @@ hscroll_window_tree (Lisp_Object window) | |||
| 12126 | h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w); | 12127 | h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w); |
| 12127 | 12128 | ||
| 12128 | if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->buffer)) | 12129 | if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->buffer)) |
| 12129 | && ((XFASTINT (w->hscroll) | 12130 | /* For left-to-right rows, hscroll when cursor is either |
| 12130 | && w->cursor.x <= h_margin) | 12131 | (i) inside the right hscroll margin, or (ii) if it is |
| 12131 | || (cursor_row->enabled_p | 12132 | inside the left margin and the window is already |
| 12132 | && cursor_row->truncated_on_right_p | 12133 | hscrolled. */ |
| 12133 | && (w->cursor.x >= text_area_width - h_margin)))) | 12134 | && ((!row_r2l_p |
| 12135 | && ((XFASTINT (w->hscroll) | ||
| 12136 | && w->cursor.x <= h_margin) | ||
| 12137 | || (cursor_row->enabled_p | ||
| 12138 | && cursor_row->truncated_on_right_p | ||
| 12139 | && (w->cursor.x >= text_area_width - h_margin)))) | ||
| 12140 | /* For right-to-left rows, the logic is similar, | ||
| 12141 | except that rules for scrolling to left and right | ||
| 12142 | are reversed. E.g., if cursor.x <= h_margin, we | ||
| 12143 | need to hscroll "to the right" unconditionally, | ||
| 12144 | and that will scroll the screen to the left so as | ||
| 12145 | to reveal the next portion of the row. */ | ||
| 12146 | || (row_r2l_p | ||
| 12147 | && ((cursor_row->enabled_p | ||
| 12148 | /* FIXME: It is confusing to set the | ||
| 12149 | truncated_on_right_p flag when R2L rows | ||
| 12150 | are actually truncated on the left. */ | ||
| 12151 | && cursor_row->truncated_on_right_p | ||
| 12152 | && w->cursor.x <= h_margin) | ||
| 12153 | || (XFASTINT (w->hscroll) | ||
| 12154 | && (w->cursor.x >= text_area_width - h_margin)))))) | ||
| 12134 | { | 12155 | { |
| 12135 | struct it it; | 12156 | struct it it; |
| 12136 | int hscroll; | 12157 | int hscroll; |
| @@ -12165,7 +12186,9 @@ hscroll_window_tree (Lisp_Object window) | |||
| 12165 | ? (text_area_width - 4 * FRAME_COLUMN_WIDTH (it.f)) | 12186 | ? (text_area_width - 4 * FRAME_COLUMN_WIDTH (it.f)) |
| 12166 | : (text_area_width / 2)))) | 12187 | : (text_area_width / 2)))) |
| 12167 | / FRAME_COLUMN_WIDTH (it.f); | 12188 | / FRAME_COLUMN_WIDTH (it.f); |
| 12168 | else if (w->cursor.x >= text_area_width - h_margin) | 12189 | else if ((!row_r2l_p |
| 12190 | && w->cursor.x >= text_area_width - h_margin) | ||
| 12191 | || (row_r2l_p && w->cursor.x <= h_margin)) | ||
| 12169 | { | 12192 | { |
| 12170 | if (hscroll_relative_p) | 12193 | if (hscroll_relative_p) |
| 12171 | wanted_x = text_area_width * (1 - hscroll_step_rel) | 12194 | wanted_x = text_area_width * (1 - hscroll_step_rel) |
| @@ -13928,7 +13951,11 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13928 | ? glyph_after > glyphs_end | 13951 | ? glyph_after > glyphs_end |
| 13929 | : glyph_after < glyphs_end))))) | 13952 | : glyph_after < glyphs_end))))) |
| 13930 | { | 13953 | { |
| 13931 | cursor = glyph_after; | 13954 | if (!match_with_avoid_cursor |
| 13955 | && row->truncated_on_left_p && pt_old < bpos_min) | ||
| 13956 | cursor = glyph_before; | ||
| 13957 | else | ||
| 13958 | cursor = glyph_after; | ||
| 13932 | x = -1; | 13959 | x = -1; |
| 13933 | } | 13960 | } |
| 13934 | else if (string_seen) | 13961 | else if (string_seen) |