diff options
| author | Glenn Morris | 2012-11-12 18:25:59 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-11-12 18:25:59 -0800 |
| commit | f78ee6afc094cdfd6162bfd645836e84875dcddf (patch) | |
| tree | 3a2c4f5d6441e53adadb69ed2af0b64abf3cf239 | |
| parent | b95a9c0cba301ef8f1920a1d123ccd6873c14a63 (diff) | |
| parent | f8705f6e3102454bf1e3213956eb3ac8160ff047 (diff) | |
| download | emacs-f78ee6afc094cdfd6162bfd645836e84875dcddf.tar.gz emacs-f78ee6afc094cdfd6162bfd645836e84875dcddf.zip | |
Merge from emacs-24; up to 2012-11-09T14:45:15Z!dmantipov@yandex.ru
| -rw-r--r-- | doc/emacs/ChangeLog | 9 | ||||
| -rw-r--r-- | doc/emacs/building.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 10 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 15 | ||||
| -rw-r--r-- | doc/lispref/control.texi | 13 | ||||
| -rw-r--r-- | doc/lispref/debugging.texi | 29 | ||||
| -rw-r--r-- | doc/lispref/errors.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 34 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/misc/flymake.texi | 20 | ||||
| -rw-r--r-- | etc/NEWS | 24 | ||||
| -rw-r--r-- | lisp/ChangeLog | 50 | ||||
| -rw-r--r-- | lisp/ansi-color.el | 57 | ||||
| -rw-r--r-- | lisp/cedet/ChangeLog | 21 | ||||
| -rw-r--r-- | lisp/cedet/semantic/grammar.el | 4 | ||||
| -rw-r--r-- | lisp/cedet/semantic/mru-bookmark.el | 6 | ||||
| -rw-r--r-- | lisp/cedet/semantic/util-modes.el | 12 | ||||
| -rw-r--r-- | lisp/cedet/srecode/srt-mode.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 8 | ||||
| -rw-r--r-- | lisp/emacs-lisp/gv.el | 5 | ||||
| -rw-r--r-- | lisp/help.el | 2 | ||||
| -rw-r--r-- | lisp/ibuffer.el | 14 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 30 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 137 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 12 | ||||
| -rw-r--r-- | lisp/window.el | 37 | ||||
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/xdisp.c | 16 | ||||
| -rw-r--r-- | test/automated/ruby-mode-tests.el | 4 |
29 files changed, 395 insertions, 199 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index f6d536a08d1..fbdb6363b34 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-11-13 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * building.texi (Multithreaded Debugging): gdb-stopped-hooks is | ||
| 4 | actually named gdb-stopped-functions. | ||
| 5 | |||
| 6 | 2012-11-13 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * misc.texi (Single Shell): Mention async-shell-command-buffer. | ||
| 9 | |||
| 1 | 2012-11-10 Glenn Morris <rgm@gnu.org> | 10 | 2012-11-10 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * misc.texi (Terminal emulator): Rename `term-face' to `term'. | 12 | * misc.texi (Terminal emulator): Rename `term-face' to `term'. |
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 3a3630138de..e0ea72902fb 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi | |||
| @@ -1244,8 +1244,8 @@ depending on the reason which caused the stop. Customize the variable | |||
| 1244 | @code{gdb-switch-reasons} to select the stop reasons which will cause | 1244 | @code{gdb-switch-reasons} to select the stop reasons which will cause |
| 1245 | a thread switch. | 1245 | a thread switch. |
| 1246 | 1246 | ||
| 1247 | @vindex gdb-stopped-hooks | 1247 | @vindex gdb-stopped-functions |
| 1248 | The variable @code{gdb-stopped-hooks} allows you to execute your | 1248 | The variable @code{gdb-stopped-functions} allows you to execute your |
| 1249 | functions whenever some thread stops. | 1249 | functions whenever some thread stops. |
| 1250 | 1250 | ||
| 1251 | In non-stop mode, you can switch between different modes for GUD | 1251 | In non-stop mode, you can switch between different modes for GUD |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 244920a23ae..1836c1982e6 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -542,11 +542,19 @@ which is impossible to ignore. | |||
| 542 | You can also type @kbd{M-&} (@code{async-shell-command}) to execute a | 542 | You can also type @kbd{M-&} (@code{async-shell-command}) to execute a |
| 543 | shell command asynchronously; this is exactly like calling @kbd{M-!} | 543 | shell command asynchronously; this is exactly like calling @kbd{M-!} |
| 544 | with a trailing @samp{&}, except that you do not need the @samp{&}. | 544 | with a trailing @samp{&}, except that you do not need the @samp{&}. |
| 545 | The output buffer for asynchronous shell commands is named | 545 | The default output buffer for asynchronous shell commands is named |
| 546 | @samp{*Async Shell Command*}. Emacs inserts the output into this | 546 | @samp{*Async Shell Command*}. Emacs inserts the output into this |
| 547 | buffer as it comes in, whether or not the buffer is visible in a | 547 | buffer as it comes in, whether or not the buffer is visible in a |
| 548 | window. | 548 | window. |
| 549 | 549 | ||
| 550 | @vindex async-shell-command-buffer | ||
| 551 | If you want to run more than one asynchronous shell command at the | ||
| 552 | same time, they could end up competing for the output buffer. The | ||
| 553 | option @code{async-shell-command-buffer} specifies what to do about | ||
| 554 | this; e.g., whether to rename the pre-existing output buffer, or to | ||
| 555 | use a different buffer for the new command. Consult the variable's | ||
| 556 | documentation for more possibilities. | ||
| 557 | |||
| 550 | @kindex M-| | 558 | @kindex M-| |
| 551 | @findex shell-command-on-region | 559 | @findex shell-command-on-region |
| 552 | @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!}, but | 560 | @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!}, but |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7eb75ceac55..6d6ddf4da9a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2012-11-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * variables.texi (Adding Generalized Variables): | ||
| 4 | At least mention gv-define-expander and gv-letplace. | ||
| 5 | |||
| 6 | * debugging.texi (Error Debugging): Mention debug-on-message. | ||
| 7 | (Using Debugger): Mention debugger-bury-or-kill. | ||
| 8 | |||
| 9 | * control.texi (Signaling Errors): | ||
| 10 | * debugging.texi (Error Debugging): | ||
| 11 | * errors.texi (Standard Errors): Add user-error. | ||
| 12 | |||
| 13 | * variables.texi (Adding Generalized Variables): | ||
| 14 | Use standard formatting for common lisp note about setf functions. | ||
| 15 | |||
| 1 | 2012-11-10 Martin Rudalics <rudalics@gmx.at> | 16 | 2012-11-10 Martin Rudalics <rudalics@gmx.at> |
| 2 | 17 | ||
| 3 | * elisp.texi (Top): Add Recombining Windows to menu. | 18 | * elisp.texi (Top): Add Recombining Windows to menu. |
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index cf393b59c49..489e5cc5b22 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -824,6 +824,19 @@ The function @code{signal} never returns. | |||
| 824 | @end example | 824 | @end example |
| 825 | @end defun | 825 | @end defun |
| 826 | 826 | ||
| 827 | @cindex user errors, signaling | ||
| 828 | @defun user-error format-string &rest args | ||
| 829 | This function behaves exactly like @code{error}, except that it uses | ||
| 830 | the error symbol @code{user-error} rather than @code{error}. As the | ||
| 831 | name suggests, this is intended to report errors on the part of the | ||
| 832 | user, rather than errors in the code itself. For example, | ||
| 833 | if you try to use the command @code{Info-history-back} (@kbd{l}) to | ||
| 834 | move back beyond the start of your Info browsing history, Emacs | ||
| 835 | signals a @code{user-error}. Such errors do not cause entry to the | ||
| 836 | debugger, even when @code{debug-on-error} is non-@code{nil}. | ||
| 837 | @xref{Error Debugging}. | ||
| 838 | @end defun | ||
| 839 | |||
| 827 | @cindex CL note---no continuable errors | 840 | @cindex CL note---no continuable errors |
| 828 | @quotation | 841 | @quotation |
| 829 | @b{Common Lisp note:} Emacs Lisp has nothing like the Common Lisp | 842 | @b{Common Lisp note:} Emacs Lisp has nothing like the Common Lisp |
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 2226db942d1..11532b19781 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -117,12 +117,12 @@ has any of those condition symbols, or if the error message matches | |||
| 117 | any of the regular expressions, then that error does not enter the | 117 | any of the regular expressions, then that error does not enter the |
| 118 | debugger. | 118 | debugger. |
| 119 | 119 | ||
| 120 | The normal value of this variable lists several errors that happen | 120 | The normal value of this variable includes @code{user-error}, as well |
| 121 | often during editing but rarely result from bugs in Lisp programs. | 121 | as several errors that happen often during editing but rarely result |
| 122 | However, ``rarely'' is not ``never''; if your program fails with an | 122 | from bugs in Lisp programs. However, ``rarely'' is not ``never''; if |
| 123 | error that matches this list, you may try changing this list to debug | 123 | your program fails with an error that matches this list, you may try |
| 124 | the error. The easiest way is usually to set | 124 | changing this list to debug the error. The easiest way is usually to |
| 125 | @code{debug-ignored-errors} to @code{nil}. | 125 | set @code{debug-ignored-errors} to @code{nil}. |
| 126 | @end defopt | 126 | @end defopt |
| 127 | 127 | ||
| 128 | @defopt eval-expression-debug-on-error | 128 | @defopt eval-expression-debug-on-error |
| @@ -163,6 +163,14 @@ supported values correspond to the signals @code{SIGUSR1} and | |||
| 163 | @code{inhibit-quit} is set and Emacs is not otherwise responding. | 163 | @code{inhibit-quit} is set and Emacs is not otherwise responding. |
| 164 | @end defopt | 164 | @end defopt |
| 165 | 165 | ||
| 166 | @cindex message, finding what causes a particular message | ||
| 167 | @defvar debug-on-message | ||
| 168 | If you set @code{debug-on-message} to a regular expression, | ||
| 169 | Emacs will enter the debugger if it displays a matching message in the | ||
| 170 | echo area. For example, this can be useful when trying to find the | ||
| 171 | cause of a particular message. | ||
| 172 | @end defvar | ||
| 173 | |||
| 166 | To debug an error that happens during loading of the init | 174 | To debug an error that happens during loading of the init |
| 167 | file, use the option @samp{--debug-init}. This binds | 175 | file, use the option @samp{--debug-init}. This binds |
| 168 | @code{debug-on-error} to @code{t} while loading the init file, and | 176 | @code{debug-on-error} to @code{t} while loading the init file, and |
| @@ -314,6 +322,7 @@ is a message describing the reason that the debugger was invoked (such | |||
| 314 | as the error message and associated data, if it was invoked due to an | 322 | as the error message and associated data, if it was invoked due to an |
| 315 | error). | 323 | error). |
| 316 | 324 | ||
| 325 | @vindex debugger-bury-or-kill | ||
| 317 | The backtrace buffer is read-only and uses a special major mode, | 326 | The backtrace buffer is read-only and uses a special major mode, |
| 318 | Debugger mode, in which letters are defined as debugger commands. The | 327 | Debugger mode, in which letters are defined as debugger commands. The |
| 319 | usual Emacs editing commands are available; thus, you can switch windows | 328 | usual Emacs editing commands are available; thus, you can switch windows |
| @@ -322,8 +331,12 @@ switch buffers, visit files, or do any other sort of editing. However, | |||
| 322 | the debugger is a recursive editing level (@pxref{Recursive Editing}) | 331 | the debugger is a recursive editing level (@pxref{Recursive Editing}) |
| 323 | and it is wise to go back to the backtrace buffer and exit the debugger | 332 | and it is wise to go back to the backtrace buffer and exit the debugger |
| 324 | (with the @kbd{q} command) when you are finished with it. Exiting | 333 | (with the @kbd{q} command) when you are finished with it. Exiting |
| 325 | the debugger gets out of the recursive edit and kills the backtrace | 334 | the debugger gets out of the recursive edit and buries the backtrace |
| 326 | buffer. | 335 | buffer. (You can customize what the @kbd{q} command does with the |
| 336 | backtrace buffer by setting the variable @code{debugger-bury-or-kill}. | ||
| 337 | For example, set it to @code{kill} if you prefer to kill the buffer | ||
| 338 | rather than bury it. Consult the variable's documentation for more | ||
| 339 | possibilities.) | ||
| 327 | 340 | ||
| 328 | When the debugger has been entered, the @code{debug-on-error} | 341 | When the debugger has been entered, the @code{debug-on-error} |
| 329 | variable is temporarily set according to | 342 | variable is temporarily set according to |
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index a57f74d6c86..b92fd9ed665 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi | |||
| @@ -172,6 +172,9 @@ The message is @samp{Text is read-only}. This is a subcategory of | |||
| 172 | @item undefined-color | 172 | @item undefined-color |
| 173 | The message is @samp{Undefined color}. @xref{Color Names}. | 173 | The message is @samp{Undefined color}. @xref{Color Names}. |
| 174 | 174 | ||
| 175 | @item user-error | ||
| 176 | The message is the empty string. @xref{Signaling Errors}. | ||
| 177 | |||
| 175 | @item void-function | 178 | @item void-function |
| 176 | The message is @samp{Symbol's function definition is void}. | 179 | The message is @samp{Symbol's function definition is void}. |
| 177 | @xref{Function Cells}. | 180 | @xref{Function Cells}. |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index c8451527d4f..dfde3c45c04 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -2133,20 +2133,24 @@ set. An example of using this macro is: | |||
| 2133 | @end example | 2133 | @end example |
| 2134 | @end defmac | 2134 | @end defmac |
| 2135 | 2135 | ||
| 2136 | @c FIXME? Not sure what, if anything, to say about this. | 2136 | @findex gv-define-expander |
| 2137 | @ignore | 2137 | @findex gv-letplace |
| 2138 | @defmac gv-define-expander name handler | 2138 | @c FIXME? Not sure what or how much to say about these. |
| 2139 | This is the most general way to define a new @code{setf} expansion. | 2139 | @c See cl.texi for an example of using gv-letplace. |
| 2140 | @end defmac | 2140 | For more control over the expansion, see the macro @code{gv-define-expander}. |
| 2141 | @end ignore | 2141 | The macro @code{gv-letplace} can be useful in defining macros that |
| 2142 | perform similarly to @code{setf}; for example, the @code{incf} macro | ||
| 2143 | of Common Lisp. Consult the source file @file{gv.el} for more details. | ||
| 2142 | 2144 | ||
| 2143 | @cindex CL note---no @code{setf} functions | 2145 | @cindex CL note---no @code{setf} functions |
| 2144 | Common Lisp defines another way to specify the @code{setf} behavior of | 2146 | @quotation |
| 2145 | a function, namely ``@code{setf} functions'', whose names are lists | 2147 | @b{Common Lisp note:} Common Lisp defines another way to specify the |
| 2146 | @code{(setf @var{name})} rather than symbols. For example, | 2148 | @code{setf} behavior of a function, namely ``@code{setf} functions'', |
| 2147 | @code{(defun (setf foo) @dots{})} defines the function that is used | 2149 | whose names are lists @code{(setf @var{name})} rather than symbols. |
| 2148 | when @code{setf} is applied to @code{foo}. Emacs does not support | 2150 | For example, @code{(defun (setf foo) @dots{})} defines the function |
| 2149 | this. It is a compile-time error to use @code{setf} on a form that | 2151 | that is used when @code{setf} is applied to @code{foo}. Emacs does |
| 2150 | has not already had an appropriate expansion defined. In Common Lisp, | 2152 | not support this. It is a compile-time error to use @code{setf} on a |
| 2151 | this is not an error since the function @code{(setf @var{func})} might | 2153 | form that has not already had an appropriate expansion defined. In |
| 2152 | be defined later. | 2154 | Common Lisp, this is not an error since the function @code{(setf |
| 2155 | @var{func})} might be defined later. | ||
| 2156 | @end quotation | ||
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index bfe58fe0a88..7322613e0db 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-11-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * flymake.texi (Customizable variables) | ||
| 4 | (Highlighting erroneous lines): Mention flymake-error-bitmap, | ||
| 5 | flymake-warning-bitmap, and flymake-fringe-indicator-position. | ||
| 6 | |||
| 1 | 2012-11-12 Vincent Belaïche <vincentb1@users.sourceforge.net> | 7 | 2012-11-12 Vincent Belaïche <vincentb1@users.sourceforge.net> |
| 2 | 8 | ||
| 3 | * ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range. | 9 | * ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range. |
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 28fb7864f06..4a873490e86 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi | |||
| @@ -337,6 +337,17 @@ been reported. | |||
| 337 | A custom face for highlighting lines for which at least one warning | 337 | A custom face for highlighting lines for which at least one warning |
| 338 | and no errors have been reported. | 338 | and no errors have been reported. |
| 339 | 339 | ||
| 340 | @item flymake-error-bitmap | ||
| 341 | A bitmap used in the fringe to mark lines for which an error has | ||
| 342 | been reported. | ||
| 343 | |||
| 344 | @item flymake-warning-bitmap | ||
| 345 | A bitmap used in the fringe to mark lines for which a warning has | ||
| 346 | been reported. | ||
| 347 | |||
| 348 | @item flymake-fringe-indicator-position | ||
| 349 | Which fringe (if any) should show the warning/error bitmaps. | ||
| 350 | |||
| 340 | @end table | 351 | @end table |
| 341 | 352 | ||
| 342 | @node Adding support for a new syntax check tool | 353 | @node Adding support for a new syntax check tool |
| @@ -718,6 +729,15 @@ are used: @code{flymake-errline} and | |||
| 718 | @code{flymake-warnline}. Errors belonging outside the current | 729 | @code{flymake-warnline}. Errors belonging outside the current |
| 719 | buffer are considered to belong to line 1 of the current buffer. | 730 | buffer are considered to belong to line 1 of the current buffer. |
| 720 | 731 | ||
| 732 | @c This manual does not use vindex. | ||
| 733 | @c @vindex flymake-fringe-indicator-position | ||
| 734 | @c @vindex flymake-error-bitmap | ||
| 735 | @c @vindex flymake-warning-bitmap | ||
| 736 | If the option @code{flymake-fringe-indicator-position} is non-@code{nil}, | ||
| 737 | errors and warnings are also highlighted in the left or right fringe, | ||
| 738 | using the bitmaps specified by @code{flymake-error-bitmap} | ||
| 739 | and @code{flymake-warning-bitmap}. | ||
| 740 | |||
| 721 | @node Interaction with other modes | 741 | @node Interaction with other modes |
| 722 | @section Interaction with other modes | 742 | @section Interaction with other modes |
| 723 | @cindex Interaction with other modes | 743 | @cindex Interaction with other modes |
| @@ -162,6 +162,7 @@ next and previous path separator, respectively. | |||
| 162 | *** minibuffer-electric-default-mode can rewrite (default ...) to [...]. | 162 | *** minibuffer-electric-default-mode can rewrite (default ...) to [...]. |
| 163 | Just set minibuffer-eldef-shorten-default to t before enabling the mode. | 163 | Just set minibuffer-eldef-shorten-default to t before enabling the mode. |
| 164 | 164 | ||
| 165 | +++ | ||
| 165 | ** ImageMagick support, if available, is automatically enabled. | 166 | ** ImageMagick support, if available, is automatically enabled. |
| 166 | It is no longer necessary to call `imagemagick-register-types' | 167 | It is no longer necessary to call `imagemagick-register-types' |
| 167 | explicitly to install ImageMagick image types; that function is called | 168 | explicitly to install ImageMagick image types; that function is called |
| @@ -470,6 +471,7 @@ when you receive a private message or your nickname is mentioned. | |||
| 470 | *** ERC will look up server/channel names via auth-source and use any | 471 | *** ERC will look up server/channel names via auth-source and use any |
| 471 | channel keys found. | 472 | channel keys found. |
| 472 | 473 | ||
| 474 | +++ | ||
| 473 | ** Flymake uses fringe bitmaps to indicate errors and warnings. | 475 | ** Flymake uses fringe bitmaps to indicate errors and warnings. |
| 474 | See `flymake-fringe-indicator-position', `flymake-error-bitmap' and | 476 | See `flymake-fringe-indicator-position', `flymake-error-bitmap' and |
| 475 | `flymake-warning-bitmap'. | 477 | `flymake-warning-bitmap'. |
| @@ -478,10 +480,12 @@ See `flymake-fringe-indicator-position', `flymake-error-bitmap' and | |||
| 478 | ** Follow mode no longer works by using advice. | 480 | ** Follow mode no longer works by using advice. |
| 479 | The option `follow-intercept-processes' has been removed. | 481 | The option `follow-intercept-processes' has been removed. |
| 480 | 482 | ||
| 483 | --- | ||
| 481 | ** The FFAP option `ffap-url-unwrap-remote' can now be a list of strings, | 484 | ** The FFAP option `ffap-url-unwrap-remote' can now be a list of strings, |
| 482 | specifying URL types which should be converted to remote file names at | 485 | specifying URL types that should be converted to remote file names at |
| 483 | the FFAP prompt. The default is now '("ftp"). | 486 | the FFAP prompt. The default is now '("ftp"). |
| 484 | 487 | ||
| 488 | --- | ||
| 485 | ** New Ibuffer `derived-mode' filter, bound to `/ M'. | 489 | ** New Ibuffer `derived-mode' filter, bound to `/ M'. |
| 486 | The old binding for `/ M' (filter by used-mode) is now bound to `/ m'. | 490 | The old binding for `/ M' (filter by used-mode) is now bound to `/ m'. |
| 487 | 491 | ||
| @@ -497,11 +501,14 @@ The old binding for `/ M' (filter by used-mode) is now bound to `/ m'. | |||
| 497 | The function `notifications-get-capabilities' returns the supported | 501 | The function `notifications-get-capabilities' returns the supported |
| 498 | server properties. | 502 | server properties. |
| 499 | 503 | ||
| 504 | --- | ||
| 500 | ** In Perl mode, new option `perl-indent-parens-as-block' causes non-block | 505 | ** In Perl mode, new option `perl-indent-parens-as-block' causes non-block |
| 501 | closing brackets to be aligned with the line of the opening bracket. | 506 | closing brackets to be aligned with the line of the opening bracket. |
| 502 | 507 | ||
| 508 | --- | ||
| 503 | ** In Proced mode, new command `proced-renice' renices marked processes. | 509 | ** In Proced mode, new command `proced-renice' renices marked processes. |
| 504 | 510 | ||
| 511 | --- | ||
| 505 | ** Python mode | 512 | ** Python mode |
| 506 | 513 | ||
| 507 | A new version of python.el, which provides several new features, including: | 514 | A new version of python.el, which provides several new features, including: |
| @@ -548,6 +555,8 @@ python-insert-while | python-skeleton-while | |||
| 548 | python-find-function | python-nav-jump-to-defun | 555 | python-find-function | python-nav-jump-to-defun |
| 549 | python-next-statement | python-nav-forward-sentence | 556 | python-next-statement | python-nav-forward-sentence |
| 550 | python-previous-statement | python-nav-backward-sentence | 557 | python-previous-statement | python-nav-backward-sentence |
| 558 | python-beginning-of-defun-function | python-nav-beginning-of-defun | ||
| 559 | python-end-of-defun-function | python-nav-end-of-defun | ||
| 551 | python-send-buffer | python-shell-send-buffer | 560 | python-send-buffer | python-shell-send-buffer |
| 552 | python-send-defun | python-shell-send-defun | 561 | python-send-defun | python-shell-send-defun |
| 553 | python-send-region | python-shell-send-region | 562 | python-send-region | python-shell-send-region |
| @@ -586,8 +595,9 @@ Sphinx support has been improved. | |||
| 586 | 595 | ||
| 587 | *** `sh-use-smie' lets you choose a new indentation and navigation code. | 596 | *** `sh-use-smie' lets you choose a new indentation and navigation code. |
| 588 | 597 | ||
| 598 | +++ | ||
| 589 | ** New option `async-shell-command-buffer' specifies the buffer to use | 599 | ** New option `async-shell-command-buffer' specifies the buffer to use |
| 590 | for a new asynchronous shell command when the default output buffer | 600 | for a new asynchronous `shell-command' when the default output buffer |
| 591 | `*Async Shell Command*' is already in use. | 601 | `*Async Shell Command*' is already in use. |
| 592 | 602 | ||
| 593 | --- | 603 | --- |
| @@ -831,11 +841,15 @@ table, but with a different prefix. | |||
| 831 | 841 | ||
| 832 | ** Debugger changes | 842 | ** Debugger changes |
| 833 | 843 | ||
| 844 | +++ | ||
| 834 | *** New error type and new function `user-error'. | 845 | *** New error type and new function `user-error'. |
| 835 | These do not trigger the debugger. | 846 | These do not trigger the debugger. |
| 836 | 847 | ||
| 837 | *** New option `debugger-bury-or-kill'. | 848 | +++ |
| 849 | *** New option `debugger-bury-or-kill', saying what to do with the | ||
| 850 | debugger buffer when exiting debug. | ||
| 838 | 851 | ||
| 852 | +++ | ||
| 839 | *** Set `debug-on-message' to enter the debugger when a certain | 853 | *** Set `debug-on-message' to enter the debugger when a certain |
| 840 | message is displayed in the echo area. This can be useful when trying | 854 | message is displayed in the echo area. This can be useful when trying |
| 841 | to work out which code is doing something. | 855 | to work out which code is doing something. |
| @@ -900,7 +914,7 @@ in Emacs 24.1: | |||
| 900 | *** `current-time-string' no longer requires that its argument's year | 914 | *** `current-time-string' no longer requires that its argument's year |
| 901 | must be in the range 1000..9999. It now works with any year supported | 915 | must be in the range 1000..9999. It now works with any year supported |
| 902 | by the underlying C implementation. | 916 | by the underlying C implementation. |
| 903 | 917 | +++ | |
| 904 | *** `current-time' now returns extended-format time stamps | 918 | *** `current-time' now returns extended-format time stamps |
| 905 | (HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds. | 919 | (HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds. |
| 906 | PSEC is typically a multiple of 1000 on current machines. Other | 920 | PSEC is typically a multiple of 1000 on current machines. Other |
| @@ -912,7 +926,7 @@ stamps are still accepted. | |||
| 912 | [TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS]. | 926 | [TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS]. |
| 913 | The PSECS slot is new, and uses picosecond resolution. It can be | 927 | The PSECS slot is new, and uses picosecond resolution. It can be |
| 914 | accessed via the new timer--psecs accessor. | 928 | accessed via the new timer--psecs accessor. |
| 915 | 929 | +++ | |
| 916 | *** Last-modified time stamps in undo lists now are of the form | 930 | *** Last-modified time stamps in undo lists now are of the form |
| 917 | (t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS). | 931 | (t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS). |
| 918 | 932 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f53b58b0129..6ab2880f09f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,53 @@ | |||
| 1 | 2012-11-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/gv.el (gv-define-simple-setter): One more fix (bug#12871). | ||
| 4 | |||
| 5 | 2012-11-13 Wolfgang Jenkner <wjenkner@inode.at> | ||
| 6 | |||
| 7 | * ansi-color.el (ansi-color-apply-sequence): Implement SGR codes | ||
| 8 | 39 and 49 (bug#12792). Also, treat unimplemented parameters as 0, | ||
| 9 | thereby restoring the behavior of revisions prior to 2012-08-15T03:33:55Z!monnier@iro.umontreal.ca. | ||
| 10 | |||
| 11 | 2012-11-13 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 12 | |||
| 13 | Fix end-of-defun misbehavior. | ||
| 14 | * progmodes/python.el (python-nav-beginning-of-defun): Rename from | ||
| 15 | python-beginning-of-defun-function. Handle nested defuns | ||
| 16 | correctly. | ||
| 17 | (python-nav-end-of-defun): Rename from | ||
| 18 | python-end-of-defun-function. Ensure forward movement. | ||
| 19 | (python-info-current-defun): Reimplement to work as intended | ||
| 20 | with new fixed python-nav-{end,beginning}-of-defun. Stop scanning | ||
| 21 | parent defuns as soon as possible. | ||
| 22 | |||
| 23 | 2012-11-13 Glenn Morris <rgm@gnu.org> | ||
| 24 | |||
| 25 | * progmodes/flymake.el (flymake-error-bitmap) | ||
| 26 | (flymake-warning-bitmap, flymake-fringe-indicator-position): Doc fixes. | ||
| 27 | (flymake-error-bitmap, flymake-warning-bitmap): Fix :types. | ||
| 28 | |||
| 29 | 2012-11-13 Dmitry Gutov <dgutov@yandex.ru> | ||
| 30 | |||
| 31 | * progmodes/ruby-mode.el (ruby-move-to-block): When moving | ||
| 32 | backward, always stop at indentation. Reverts the change from | ||
| 33 | 2012-08-12T22:06:56Z!monnier@iro.umontreal.ca (Bug#12851). | ||
| 34 | |||
| 35 | 2012-11-13 Glenn Morris <rgm@gnu.org> | ||
| 36 | |||
| 37 | * ibuffer.el (ibuffer-mode-map, ibuffer-mode): | ||
| 38 | Add ibuffer-filter-by-derived-mode. | ||
| 39 | |||
| 40 | * ibuffer.el (ibuffer-mode-map): Don't have two menu items with | ||
| 41 | the same name shadowing each other. | ||
| 42 | |||
| 43 | * window.el (with-temp-buffer-window): Doc tweak. | ||
| 44 | |||
| 45 | * emacs-lisp/debug.el (debugger-bury-or-kill): Doc tweak. | ||
| 46 | |||
| 47 | * help.el (temp-buffer-max-height): | ||
| 48 | * window.el (fit-frame-to-buffer, fit-frame-to-buffer-bottom-margin): | ||
| 49 | * emacs-lisp/debug.el (debugger-bury-or-kill): Fix :version. | ||
| 50 | |||
| 1 | 2012-11-12 Stefan Monnier <monnier@iro.umontreal.ca> | 51 | 2012-11-12 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 52 | ||
| 3 | * emacs-lisp/nadvice.el: New package. | 53 | * emacs-lisp/nadvice.el: New package. |
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 047b4b944b9..da2880c404c 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el | |||
| @@ -534,34 +534,39 @@ Returns nil only if there's no match for `ansi-color-parameter-regexp'." | |||
| 534 | 534 | ||
| 535 | ESCAPE-SEQ is an escape sequence parsed by `ansi-color-parse-sequence'. | 535 | ESCAPE-SEQ is an escape sequence parsed by `ansi-color-parse-sequence'. |
| 536 | 536 | ||
| 537 | If the new codes resulting from ESCAPE-SEQ start with 0, then the | 537 | For each new code, the following happens: if it is 1-7, add it to |
| 538 | old codes are discarded and the remaining new codes are | 538 | the list of codes; if it is 21-25 or 27, delete appropriate |
| 539 | processed. Otherwise, for each new code: if it is 21-25 or 27-29 | 539 | parameters from the list of codes; if it is 30-37 resp. 39, the |
| 540 | delete appropriate parameters from the list of codes; any other | 540 | foreground color code is replaced or added resp. deleted; if it |
| 541 | code that makes sense is added to the list of codes. Finally, | 541 | is 40-47 resp. 49, the background color code is replaced or added |
| 542 | the so changed list of codes is returned." | 542 | resp. deleted; any other code is discarded together with the old |
| 543 | codes. Finally, the so changed list of codes is returned." | ||
| 543 | (let ((new-codes (ansi-color-parse-sequence escape-sequence))) | 544 | (let ((new-codes (ansi-color-parse-sequence escape-sequence))) |
| 544 | (while new-codes | 545 | (while new-codes |
| 545 | (setq codes | 546 | (let* ((new (pop new-codes)) |
| 546 | (let ((new (pop new-codes))) | 547 | (q (/ new 10))) |
| 547 | (cond ((zerop new) | 548 | (setq codes |
| 548 | nil) | 549 | (pcase q |
| 549 | ((or (<= new 20) | 550 | (0 (unless (memq new '(0 8 9)) |
| 550 | (>= new 30)) | 551 | (cons new (remq new codes)))) |
| 551 | (if (memq new codes) | 552 | (2 (unless (memq new '(20 26 28 29)) |
| 552 | codes | 553 | ;; The standard says `21 doubly underlined' while |
| 553 | (cons new codes))) | 554 | ;; http://en.wikipedia.org/wiki/ANSI_escape_code claims |
| 554 | ;; The standard says `21 doubly underlined' while | 555 | ;; `21 Bright/Bold: off or Underline: Double'. |
| 555 | ;; http://en.wikipedia.org/wiki/ANSI_escape_code claims | 556 | (remq (- new 20) (pcase new |
| 556 | ;; `21 Bright/Bold: off or Underline: Double'. | 557 | (22 (remq 1 codes)) |
| 557 | ((/= new 26) | 558 | (25 (remq 6 codes)) |
| 558 | (remq (- new 20) | 559 | (_ codes))))) |
| 559 | (cond ((= new 22) | 560 | ((or 3 4) (let ((r (mod new 10))) |
| 560 | (remq 1 codes)) | 561 | (unless (= r 8) |
| 561 | ((= new 25) | 562 | (let (beg) |
| 562 | (remq 6 codes)) | 563 | (while (and codes (/= q (/ (car codes) 10))) |
| 563 | (t codes)))) | 564 | (push (pop codes) beg)) |
| 564 | (t codes))))) | 565 | (setq codes (nconc (nreverse beg) (cdr codes))) |
| 566 | (if (= r 9) | ||
| 567 | codes | ||
| 568 | (cons new codes)))))) | ||
| 569 | (_ nil))))) | ||
| 565 | codes)) | 570 | codes)) |
| 566 | 571 | ||
| 567 | (defun ansi-color-make-color-map () | 572 | (defun ansi-color-make-color-map () |
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 6f2669e9fee..755f4c8159b 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,7 +1,20 @@ | |||
| 1 | 2012-11-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * semantic/mru-bookmark.el (semantic-mru-bookmark-mode): | ||
| 4 | * semantic/grammar.el (semantic-grammar-mode): | ||
| 5 | * semantic/util-modes.el (semantic-highlight-edits-mode) | ||
| 6 | (semantic-show-parser-state-mode): Avoid obsolete name | ||
| 7 | semantic-edits-new-change-hooks (bug#12869). | ||
| 8 | |||
| 9 | 2012-11-13 Glenn Morris <rgm@gnu.org> | ||
| 10 | |||
| 11 | * srecode/srt-mode.el (srecode-template-mode): | ||
| 12 | Don't change global values of comment-start, comment-end. (Bug#12781) | ||
| 13 | |||
| 1 | 2012-10-25 David Engster <deng@randomsample.de> | 14 | 2012-10-25 David Engster <deng@randomsample.de> |
| 2 | 15 | ||
| 3 | * semantic/analyze.el (semantic-analyze-dereference-alias): New | 16 | * semantic/analyze.el (semantic-analyze-dereference-alias): |
| 4 | function to dereference aliases. | 17 | New function to dereference aliases. |
| 5 | (semantic-analyze-current-context-default): Use it. | 18 | (semantic-analyze-current-context-default): Use it. |
| 6 | 19 | ||
| 7 | * semantic/grammar.el (semantic-grammar-create-package): | 20 | * semantic/grammar.el (semantic-grammar-create-package): |
| @@ -12,8 +25,8 @@ | |||
| 12 | 25 | ||
| 13 | * semantic.el (semantic-elapsed-time): Make it a defsubst. | 26 | * semantic.el (semantic-elapsed-time): Make it a defsubst. |
| 14 | 27 | ||
| 15 | * srecode/dictionary.el (srecode-adebug-dictionary): Remove | 28 | * srecode/dictionary.el (srecode-adebug-dictionary): |
| 16 | require for `semantic'. | 29 | Remove require for `semantic'. |
| 17 | 30 | ||
| 18 | * srecode/map.el: | 31 | * srecode/map.el: |
| 19 | * srecode/insert.el: Declare functions from `data-debug'. | 32 | * srecode/insert.el: Declare functions from `data-debug'. |
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index c0e7b8f9038..8535c067e09 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el | |||
| @@ -1333,8 +1333,8 @@ the change bounds to encompass the whole nonterminal tag." | |||
| 1333 | (add-hook 'before-change-functions | 1333 | (add-hook 'before-change-functions |
| 1334 | 'semantic--grammar-clear-macros-regexp-2 nil t) | 1334 | 'semantic--grammar-clear-macros-regexp-2 nil t) |
| 1335 | ;; Handle safe re-parse of grammar rules. | 1335 | ;; Handle safe re-parse of grammar rules. |
| 1336 | (semantic-make-local-hook 'semantic-edits-new-change-hooks) | 1336 | (semantic-make-local-hook 'semantic-edits-new-change-functions) |
| 1337 | (add-hook 'semantic-edits-new-change-hooks | 1337 | (add-hook 'semantic-edits-new-change-functions |
| 1338 | 'semantic-grammar-edits-new-change-hook-fcn | 1338 | 'semantic-grammar-edits-new-change-hook-fcn |
| 1339 | nil t) | 1339 | nil t) |
| 1340 | (semantic-run-mode-hooks 'semantic-grammar-mode-hook)) | 1340 | (semantic-run-mode-hooks 'semantic-grammar-mode-hook)) |
diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index d042ba42582..1358fc7d062 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el | |||
| @@ -292,13 +292,13 @@ minor mode is enabled." | |||
| 292 | (setq semantic-mru-bookmark-mode nil) | 292 | (setq semantic-mru-bookmark-mode nil) |
| 293 | (error "Buffer %s was not set up for parsing" | 293 | (error "Buffer %s was not set up for parsing" |
| 294 | (buffer-name))) | 294 | (buffer-name))) |
| 295 | (semantic-make-local-hook 'semantic-edits-new-change-hooks) | 295 | (semantic-make-local-hook 'semantic-edits-new-change-functions) |
| 296 | (add-hook 'semantic-edits-new-change-hooks | 296 | (add-hook 'semantic-edits-new-change-functions |
| 297 | 'semantic-mru-bookmark-change-hook-fcn nil t) | 297 | 'semantic-mru-bookmark-change-hook-fcn nil t) |
| 298 | (add-hook 'semantic-edits-move-change-hooks | 298 | (add-hook 'semantic-edits-move-change-hooks |
| 299 | 'semantic-mru-bookmark-change-hook-fcn nil t)) | 299 | 'semantic-mru-bookmark-change-hook-fcn nil t)) |
| 300 | ;; Remove hooks | 300 | ;; Remove hooks |
| 301 | (remove-hook 'semantic-edits-new-change-hooks | 301 | (remove-hook 'semantic-edits-new-change-functions |
| 302 | 'semantic-mru-bookmark-change-hook-fcn t) | 302 | 'semantic-mru-bookmark-change-hook-fcn t) |
| 303 | (remove-hook 'semantic-edits-move-change-hooks | 303 | (remove-hook 'semantic-edits-move-change-hooks |
| 304 | 'semantic-mru-bookmark-change-hook-fcn t))) | 304 | 'semantic-mru-bookmark-change-hook-fcn t))) |
diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index c9a0faefe6c..744d37ff189 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el | |||
| @@ -221,11 +221,11 @@ minor mode is enabled." | |||
| 221 | (setq semantic-highlight-edits-mode nil) | 221 | (setq semantic-highlight-edits-mode nil) |
| 222 | (error "Buffer %s was not set up for parsing" | 222 | (error "Buffer %s was not set up for parsing" |
| 223 | (buffer-name))) | 223 | (buffer-name))) |
| 224 | (semantic-make-local-hook 'semantic-edits-new-change-hooks) | 224 | (semantic-make-local-hook 'semantic-edits-new-change-functions) |
| 225 | (add-hook 'semantic-edits-new-change-hooks | 225 | (add-hook 'semantic-edits-new-change-functions |
| 226 | 'semantic-highlight-edits-new-change-hook-fcn nil t)) | 226 | 'semantic-highlight-edits-new-change-hook-fcn nil t)) |
| 227 | ;; Remove hooks | 227 | ;; Remove hooks |
| 228 | (remove-hook 'semantic-edits-new-change-hooks | 228 | (remove-hook 'semantic-edits-new-change-functions |
| 229 | 'semantic-highlight-edits-new-change-hook-fcn t))) | 229 | 'semantic-highlight-edits-new-change-hook-fcn t))) |
| 230 | 230 | ||
| 231 | (semantic-add-minor-mode 'semantic-highlight-edits-mode | 231 | (semantic-add-minor-mode 'semantic-highlight-edits-mode |
| @@ -460,8 +460,8 @@ minor mode is enabled." | |||
| 460 | (append mode-line-modified | 460 | (append mode-line-modified |
| 461 | '(semantic-show-parser-state-string)))) | 461 | '(semantic-show-parser-state-string)))) |
| 462 | ;; Add hooks | 462 | ;; Add hooks |
| 463 | (semantic-make-local-hook 'semantic-edits-new-change-hooks) | 463 | (semantic-make-local-hook 'semantic-edits-new-change-functions) |
| 464 | (add-hook 'semantic-edits-new-change-hooks | 464 | (add-hook 'semantic-edits-new-change-functions |
| 465 | 'semantic-show-parser-state-marker nil t) | 465 | 'semantic-show-parser-state-marker nil t) |
| 466 | (semantic-make-local-hook 'semantic-edits-incremental-reparse-failed-hook) | 466 | (semantic-make-local-hook 'semantic-edits-incremental-reparse-failed-hook) |
| 467 | (add-hook 'semantic-edits-incremental-reparse-failed-hook | 467 | (add-hook 'semantic-edits-incremental-reparse-failed-hook |
| @@ -491,7 +491,7 @@ minor mode is enabled." | |||
| 491 | (setq mode-line-modified | 491 | (setq mode-line-modified |
| 492 | (delq 'semantic-show-parser-state-string mode-line-modified)) | 492 | (delq 'semantic-show-parser-state-string mode-line-modified)) |
| 493 | ;; Remove hooks | 493 | ;; Remove hooks |
| 494 | (remove-hook 'semantic-edits-new-change-hooks | 494 | (remove-hook 'semantic-edits-new-change-functions |
| 495 | 'semantic-show-parser-state-marker t) | 495 | 'semantic-show-parser-state-marker t) |
| 496 | (remove-hook 'semantic-edits-incremental-reparse-failed-hook | 496 | (remove-hook 'semantic-edits-incremental-reparse-failed-hook |
| 497 | 'semantic-show-parser-state-marker t) | 497 | 'semantic-show-parser-state-marker t) |
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index 12fc08b90e4..298c8949435 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el | |||
| @@ -189,8 +189,8 @@ we can tell font lock about them.") | |||
| 189 | ;;;###autoload | 189 | ;;;###autoload |
| 190 | (define-derived-mode srecode-template-mode fundamental-mode "SRecorder" | 190 | (define-derived-mode srecode-template-mode fundamental-mode "SRecorder" |
| 191 | "Major-mode for writing SRecode macros." | 191 | "Major-mode for writing SRecode macros." |
| 192 | (setq comment-start ";;" | 192 | (set (make-local-variable 'comment-start) ";;") |
| 193 | comment-end "") | 193 | (set (make-local-variable 'comment-end) "") |
| 194 | (set (make-local-variable 'parse-sexp-ignore-comments) t) | 194 | (set (make-local-variable 'parse-sexp-ignore-comments) t) |
| 195 | (set (make-local-variable 'comment-start-skip) | 195 | (set (make-local-variable 'comment-start-skip) |
| 196 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") | 196 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 3d4f41be8ee..a378941a5a4 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -49,9 +49,9 @@ the middle is discarded, and just the beginning and end are displayed." | |||
| 49 | :version "21.1") | 49 | :version "21.1") |
| 50 | 50 | ||
| 51 | (defcustom debugger-bury-or-kill 'bury | 51 | (defcustom debugger-bury-or-kill 'bury |
| 52 | "How to proceed with the debugger buffer when exiting `debug'. | 52 | "What to do with the debugger buffer when exiting `debug'. |
| 53 | The value used here affects the behavior of operations on any | 53 | The value affects the behavior of operations on any window |
| 54 | window previously showing the debugger buffer. | 54 | previously showing the debugger buffer. |
| 55 | 55 | ||
| 56 | `nil' means that if its window is not deleted when exiting the | 56 | `nil' means that if its window is not deleted when exiting the |
| 57 | debugger, invoking `switch-to-prev-buffer' will usually show | 57 | debugger, invoking `switch-to-prev-buffer' will usually show |
| @@ -79,7 +79,7 @@ The value used here is passed to `quit-restore-window'." | |||
| 79 | (const :tag "Bury" bury) | 79 | (const :tag "Bury" bury) |
| 80 | (const :tag "Kill" kill)) | 80 | (const :tag "Kill" kill)) |
| 81 | :group 'debugger | 81 | :group 'debugger |
| 82 | :version "24.2") | 82 | :version "24.3") |
| 83 | 83 | ||
| 84 | (defvar debugger-step-after-exit nil | 84 | (defvar debugger-step-after-exit nil |
| 85 | "Non-nil means \"single-step\" after the debugger exits.") | 85 | "Non-nil means \"single-step\" after the debugger exits.") |
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 58bfae5b503..02eec08f96b 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el | |||
| @@ -220,8 +220,9 @@ so as to preserve the semantics of `setf'." | |||
| 220 | `(gv-define-setter ,name (val &rest args) | 220 | `(gv-define-setter ,name (val &rest args) |
| 221 | ,(if fix-return | 221 | ,(if fix-return |
| 222 | `(macroexp-let2 nil v val | 222 | `(macroexp-let2 nil v val |
| 223 | (cons ',setter (append args (list v))) | 223 | `(progn |
| 224 | v) | 224 | (,',setter ,@(append args (list v))) |
| 225 | ,v)) | ||
| 225 | `(cons ',setter (append args (list val)))))) | 226 | `(cons ',setter (append args (list val)))))) |
| 226 | 227 | ||
| 227 | ;;; Typical operations on generalized variables. | 228 | ;;; Typical operations on generalized variables. |
diff --git a/lisp/help.el b/lisp/help.el index 449818207b3..de2a22714f9 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -979,7 +979,7 @@ buffer, and should return a positive integer. At the time the | |||
| 979 | function is called, the window to be resized is selected." | 979 | function is called, the window to be resized is selected." |
| 980 | :type '(choice integer function) | 980 | :type '(choice integer function) |
| 981 | :group 'help | 981 | :group 'help |
| 982 | :version "24.2") | 982 | :version "24.3") |
| 983 | 983 | ||
| 984 | (define-minor-mode temp-buffer-resize-mode | 984 | (define-minor-mode temp-buffer-resize-mode |
| 985 | "Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode). | 985 | "Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode). |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index c9dcff41618..72ca189e9d5 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -632,10 +632,13 @@ directory, like `default-directory'." | |||
| 632 | '(menu-item "Disable all filtering" ibuffer-filter-disable | 632 | '(menu-item "Disable all filtering" ibuffer-filter-disable |
| 633 | :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers))) | 633 | :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers))) |
| 634 | (define-key-after map [menu-bar view filter filter-by-mode] | 634 | (define-key-after map [menu-bar view filter filter-by-mode] |
| 635 | '(menu-item "Add filter by major mode..." ibuffer-filter-by-mode)) | 635 | '(menu-item "Add filter by any major mode..." ibuffer-filter-by-mode)) |
| 636 | (define-key-after map [menu-bar view filter filter-by-mode] | 636 | (define-key-after map [menu-bar view filter filter-by-used-mode] |
| 637 | '(menu-item "Add filter by major mode in use..." | 637 | '(menu-item "Add filter by a major mode in use..." |
| 638 | ibuffer-filter-by-used-mode)) | 638 | ibuffer-filter-by-used-mode)) |
| 639 | (define-key-after map [menu-bar view filter filter-by-derived-mode] | ||
| 640 | '(menu-item "Add filter by derived mode..." | ||
| 641 | ibuffer-filter-by-derived-mode)) | ||
| 639 | (define-key-after map [menu-bar view filter filter-by-name] | 642 | (define-key-after map [menu-bar view filter filter-by-name] |
| 640 | '(menu-item "Add filter by buffer name..." ibuffer-filter-by-name)) | 643 | '(menu-item "Add filter by buffer name..." ibuffer-filter-by-name)) |
| 641 | (define-key-after map [menu-bar view filter filter-by-filename] | 644 | (define-key-after map [menu-bar view filter filter-by-filename] |
| @@ -2438,8 +2441,9 @@ Marking commands: | |||
| 2438 | 2441 | ||
| 2439 | Filtering commands: | 2442 | Filtering commands: |
| 2440 | 2443 | ||
| 2441 | '\\[ibuffer-filter-by-mode]' - Add a filter by major mode. | 2444 | '\\[ibuffer-filter-by-mode]' - Add a filter by any major mode. |
| 2442 | '\\[ibuffer-filter-by-used-mode]' - Add a filter by major mode now in use. | 2445 | '\\[ibuffer-filter-by-used-mode]' - Add a filter by a major mode now in use. |
| 2446 | '\\[ibuffer-filter-by-derived-mode]' - Add a filter by derived mode. | ||
| 2443 | '\\[ibuffer-filter-by-name]' - Add a filter by buffer name. | 2447 | '\\[ibuffer-filter-by-name]' - Add a filter by buffer name. |
| 2444 | '\\[ibuffer-filter-by-content]' - Add a filter by buffer content. | 2448 | '\\[ibuffer-filter-by-content]' - Add a filter by buffer content. |
| 2445 | '\\[ibuffer-filter-by-filename]' - Add a filter by filename. | 2449 | '\\[ibuffer-filter-by-filename]' - Add a filter by filename. |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 2614af9ffa4..5ba84f8991e 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -764,25 +764,39 @@ line number outside the file being compiled." | |||
| 764 | (and (overlayp ov) (overlay-get ov 'flymake-overlay))) | 764 | (and (overlayp ov) (overlay-get ov 'flymake-overlay))) |
| 765 | 765 | ||
| 766 | (defcustom flymake-error-bitmap '(exclamation-mark error) | 766 | (defcustom flymake-error-bitmap '(exclamation-mark error) |
| 767 | "Bitmap used in the fringe for indicating errors. | 767 | "Bitmap (a symbol) used in the fringe for indicating errors. |
| 768 | The value may also be a list of two elements where the second | 768 | The value may also be a list of two elements where the second |
| 769 | element specifies the face for the bitmap." | 769 | element specifies the face for the bitmap. For possible bitmap |
| 770 | symbols, see `fringe-bitmaps'. See also `flymake-warning-bitmap'. | ||
| 771 | |||
| 772 | The option `flymake-fringe-indicator-position' controls how and where | ||
| 773 | this is used." | ||
| 770 | :group 'flymake | 774 | :group 'flymake |
| 771 | :version "24.3" | 775 | :version "24.3" |
| 772 | :type 'symbol) | 776 | :type '(choice (symbol :tag "Bitmap") |
| 777 | (list :tag "Bitmap and face" | ||
| 778 | (symbol :tag "Bitmap") | ||
| 779 | (face :tag "Face")))) | ||
| 773 | 780 | ||
| 774 | (defcustom flymake-warning-bitmap 'question-mark | 781 | (defcustom flymake-warning-bitmap 'question-mark |
| 775 | "Bitmap used in the fringe for indicating warnings. | 782 | "Bitmap (a symbol) used in the fringe for indicating warnings. |
| 776 | The value may also be a list of two elements where the second | 783 | The value may also be a list of two elements where the second |
| 777 | element specifies the face for the bitmap." | 784 | element specifies the face for the bitmap. For possible bitmap |
| 785 | symbols, see `fringe-bitmaps'. See also `flymake-error-bitmap'. | ||
| 786 | |||
| 787 | The option `flymake-fringe-indicator-position' controls how and where | ||
| 788 | this is used." | ||
| 778 | :group 'flymake | 789 | :group 'flymake |
| 779 | :version "24.3" | 790 | :version "24.3" |
| 780 | :type 'symbol) | 791 | :type '(choice (symbol :tag "Bitmap") |
| 792 | (list :tag "Bitmap and face" | ||
| 793 | (symbol :tag "Bitmap") | ||
| 794 | (face :tag "Face")))) | ||
| 781 | 795 | ||
| 782 | (defcustom flymake-fringe-indicator-position 'left-fringe | 796 | (defcustom flymake-fringe-indicator-position 'left-fringe |
| 783 | "The position to put flymake fringe indicator. | 797 | "The position to put flymake fringe indicator. |
| 784 | The value can be nil, left-fringe or right-fringe. | 798 | The value can be nil (do not use indicators), `left-fringe' or `right-fringe'. |
| 785 | Fringe indicators are disabled if nil." | 799 | See `flymake-error-bitmap' and `flymake-warning-bitmap'." |
| 786 | :group 'flymake | 800 | :group 'flymake |
| 787 | :version "24.3" | 801 | :version "24.3" |
| 788 | :type '(choice (const left-fringe) | 802 | :type '(choice (const left-fringe) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ee98feaef5e..949b0252bf1 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1074,12 +1074,9 @@ automatically if needed." | |||
| 1074 | The name of the defun should be grouped so it can be retrieved | 1074 | The name of the defun should be grouped so it can be retrieved |
| 1075 | via `match-string'.") | 1075 | via `match-string'.") |
| 1076 | 1076 | ||
| 1077 | (defun python-nav-beginning-of-defun (&optional arg) | 1077 | (defun python-nav--beginning-of-defun (&optional arg) |
| 1078 | "Move point to `beginning-of-defun'. | 1078 | "Internal implementation of `python-nav-beginning-of-defun'. |
| 1079 | With positive ARG move search backwards. With negative do the | 1079 | With positive ARG search backwards, else search forwards." |
| 1080 | same but forward. When ARG is nil or 0 defaults to 1. This is | ||
| 1081 | the main part of `python-beginning-of-defun-function'. Return | ||
| 1082 | non-nil if point is moved to `beginning-of-defun'." | ||
| 1083 | (when (or (null arg) (= arg 0)) (setq arg 1)) | 1080 | (when (or (null arg) (= arg 0)) (setq arg 1)) |
| 1084 | (let* ((re-search-fn (if (> arg 0) | 1081 | (let* ((re-search-fn (if (> arg 0) |
| 1085 | #'re-search-backward | 1082 | #'re-search-backward |
| @@ -1087,6 +1084,15 @@ non-nil if point is moved to `beginning-of-defun'." | |||
| 1087 | (line-beg-pos (line-beginning-position)) | 1084 | (line-beg-pos (line-beginning-position)) |
| 1088 | (line-content-start (+ line-beg-pos (current-indentation))) | 1085 | (line-content-start (+ line-beg-pos (current-indentation))) |
| 1089 | (pos (point-marker)) | 1086 | (pos (point-marker)) |
| 1087 | (beg-indentation | ||
| 1088 | (and (> arg 0) | ||
| 1089 | (save-excursion | ||
| 1090 | (and (python-info-current-line-empty-p) | ||
| 1091 | (python-util-forward-comment -1)) | ||
| 1092 | (python-nav-beginning-of-statement) | ||
| 1093 | (if (python-info-looking-at-beginning-of-defun) | ||
| 1094 | (+ (current-indentation) python-indent-offset) | ||
| 1095 | (current-indentation))))) | ||
| 1090 | (found | 1096 | (found |
| 1091 | (progn | 1097 | (progn |
| 1092 | (when (and (< arg 0) | 1098 | (when (and (< arg 0) |
| @@ -1094,7 +1100,12 @@ non-nil if point is moved to `beginning-of-defun'." | |||
| 1094 | (end-of-line 1)) | 1100 | (end-of-line 1)) |
| 1095 | (while (and (funcall re-search-fn | 1101 | (while (and (funcall re-search-fn |
| 1096 | python-nav-beginning-of-defun-regexp nil t) | 1102 | python-nav-beginning-of-defun-regexp nil t) |
| 1097 | (python-syntax-context-type))) | 1103 | (or (python-syntax-context-type) |
| 1104 | ;; Handle nested defuns when moving | ||
| 1105 | ;; backwards by checking indentation. | ||
| 1106 | (and (> arg 0) | ||
| 1107 | (not (= (current-indentation) 0)) | ||
| 1108 | (>= (current-indentation) beg-indentation))))) | ||
| 1098 | (and (python-info-looking-at-beginning-of-defun) | 1109 | (and (python-info-looking-at-beginning-of-defun) |
| 1099 | (or (not (= (line-number-at-pos pos) | 1110 | (or (not (= (line-number-at-pos pos) |
| 1100 | (line-number-at-pos))) | 1111 | (line-number-at-pos))) |
| @@ -1105,55 +1116,43 @@ non-nil if point is moved to `beginning-of-defun'." | |||
| 1105 | (or (beginning-of-line 1) t) | 1116 | (or (beginning-of-line 1) t) |
| 1106 | (and (goto-char pos) nil)))) | 1117 | (and (goto-char pos) nil)))) |
| 1107 | 1118 | ||
| 1108 | (defun python-beginning-of-defun-function (&optional arg) | 1119 | (defun python-nav-beginning-of-defun (&optional arg) |
| 1109 | "Move point to the beginning of def or class. | 1120 | "Move point to `beginning-of-defun'. |
| 1110 | With positive ARG move that number of functions backwards. With | 1121 | With positive ARG search backwards else search forward. When ARG |
| 1111 | negative do the same but forward. When ARG is nil or 0 defaults | 1122 | is nil or 0 defaults to 1. When searching backwards nested |
| 1112 | to 1. Return non-nil if point is moved to `beginning-of-defun'." | 1123 | defuns are handled with care depending on current point |
| 1124 | position. Return non-nil if point is moved to | ||
| 1125 | `beginning-of-defun'." | ||
| 1113 | (when (or (null arg) (= arg 0)) (setq arg 1)) | 1126 | (when (or (null arg) (= arg 0)) (setq arg 1)) |
| 1114 | (let ((found)) | 1127 | (let ((found)) |
| 1115 | (cond ((and (eq this-command 'mark-defun) | 1128 | (cond ((and (eq this-command 'mark-defun) |
| 1116 | (python-info-looking-at-beginning-of-defun))) | 1129 | (python-info-looking-at-beginning-of-defun))) |
| 1117 | (t | 1130 | (t |
| 1118 | (dotimes (i (if (> arg 0) arg (- arg))) | 1131 | (dotimes (i (if (> arg 0) arg (- arg))) |
| 1119 | (when (and (python-nav-beginning-of-defun arg) | 1132 | (when (and (python-nav--beginning-of-defun arg) |
| 1120 | (not found)) | 1133 | (not found)) |
| 1121 | (setq found t))))) | 1134 | (setq found t))))) |
| 1122 | found)) | 1135 | found)) |
| 1123 | 1136 | ||
| 1124 | (defun python-end-of-defun-function () | 1137 | (defun python-nav-end-of-defun () |
| 1125 | "Move point to the end of def or class. | 1138 | "Move point to the end of def or class. |
| 1126 | Returns nil if point is not in a def or class." | 1139 | Returns nil if point is not in a def or class." |
| 1127 | (interactive) | 1140 | (interactive) |
| 1128 | (let ((beg-defun-indent)) | 1141 | (let ((beg-defun-indent) |
| 1142 | (beg-pos (point))) | ||
| 1129 | (when (or (python-info-looking-at-beginning-of-defun) | 1143 | (when (or (python-info-looking-at-beginning-of-defun) |
| 1130 | (python-beginning-of-defun-function 1) | 1144 | (python-nav-beginning-of-defun 1) |
| 1131 | (python-beginning-of-defun-function -1)) | 1145 | (python-nav-beginning-of-defun -1)) |
| 1132 | (setq beg-defun-indent (current-indentation)) | 1146 | (setq beg-defun-indent (current-indentation)) |
| 1147 | (while (progn | ||
| 1148 | (python-nav-end-of-statement) | ||
| 1149 | (python-util-forward-comment 1) | ||
| 1150 | (and (> (current-indentation) beg-defun-indent) | ||
| 1151 | (not (eobp))))) | ||
| 1152 | (python-util-forward-comment -1) | ||
| 1133 | (forward-line 1) | 1153 | (forward-line 1) |
| 1134 | ;; Go as forward as possible | 1154 | ;; Ensure point moves forward. |
| 1135 | (while (and (or | 1155 | (and (> beg-pos (point)) (goto-char beg-pos))))) |
| 1136 | (python-nav-beginning-of-defun -1) | ||
| 1137 | (and (goto-char (point-max)) nil)) | ||
| 1138 | (> (current-indentation) beg-defun-indent))) | ||
| 1139 | (beginning-of-line 1) | ||
| 1140 | ;; Go as backwards as possible | ||
| 1141 | (while (and (forward-line -1) | ||
| 1142 | (not (bobp)) | ||
| 1143 | (or (not (current-word)) | ||
| 1144 | (equal (char-after (+ (point) (current-indentation))) ?#) | ||
| 1145 | (<= (current-indentation) beg-defun-indent) | ||
| 1146 | (looking-at (python-rx decorator)) | ||
| 1147 | (python-syntax-context-type)))) | ||
| 1148 | (forward-line 1) | ||
| 1149 | ;; If point falls inside a paren or string context the point is | ||
| 1150 | ;; forwarded at the end of it (or end of buffer if its not closed) | ||
| 1151 | (let ((context-type (python-syntax-context-type))) | ||
| 1152 | (when (memq context-type '(paren string)) | ||
| 1153 | ;; Slow but safe. | ||
| 1154 | (while (and (not (eobp)) | ||
| 1155 | (python-syntax-context-type)) | ||
| 1156 | (forward-line 1))))))) | ||
| 1157 | 1156 | ||
| 1158 | (defun python-nav-beginning-of-statement () | 1157 | (defun python-nav-beginning-of-statement () |
| 1159 | "Move to start of current statement." | 1158 | "Move to start of current statement." |
| @@ -2022,7 +2021,7 @@ When argument ARG is non-nil do not include decorators." | |||
| 2022 | (python-shell-send-region | 2021 | (python-shell-send-region |
| 2023 | (progn | 2022 | (progn |
| 2024 | (end-of-line 1) | 2023 | (end-of-line 1) |
| 2025 | (while (and (or (python-beginning-of-defun-function) | 2024 | (while (and (or (python-nav-beginning-of-defun) |
| 2026 | (beginning-of-line 1)) | 2025 | (beginning-of-line 1)) |
| 2027 | (> (current-indentation) 0))) | 2026 | (> (current-indentation) 0))) |
| 2028 | (when (not arg) | 2027 | (when (not arg) |
| @@ -2031,7 +2030,7 @@ When argument ARG is non-nil do not include decorators." | |||
| 2031 | (forward-line 1)) | 2030 | (forward-line 1)) |
| 2032 | (point-marker)) | 2031 | (point-marker)) |
| 2033 | (progn | 2032 | (progn |
| 2034 | (or (python-end-of-defun-function) | 2033 | (or (python-nav-end-of-defun) |
| 2035 | (end-of-line 1)) | 2034 | (end-of-line 1)) |
| 2036 | (point-marker))))) | 2035 | (point-marker))))) |
| 2037 | 2036 | ||
| @@ -2879,38 +2878,40 @@ Optional argument INCLUDE-TYPE indicates to include the type of the defun. | |||
| 2879 | This function is compatible to be used as | 2878 | This function is compatible to be used as |
| 2880 | `add-log-current-defun-function' since it returns nil if point is | 2879 | `add-log-current-defun-function' since it returns nil if point is |
| 2881 | not inside a defun." | 2880 | not inside a defun." |
| 2882 | (let ((names '()) | ||
| 2883 | (starting-indentation) | ||
| 2884 | (starting-point) | ||
| 2885 | (first-run t)) | ||
| 2886 | (save-restriction | 2881 | (save-restriction |
| 2887 | (widen) | 2882 | (widen) |
| 2888 | (save-excursion | 2883 | (save-excursion |
| 2889 | (setq starting-point (point-marker)) | ||
| 2890 | (setq starting-indentation (save-excursion | ||
| 2891 | (python-nav-beginning-of-statement) | ||
| 2892 | (current-indentation))) | ||
| 2893 | (end-of-line 1) | 2884 | (end-of-line 1) |
| 2894 | (while (python-beginning-of-defun-function 1) | 2885 | (let ((names) |
| 2895 | (when (or (< (current-indentation) starting-indentation) | 2886 | (starting-indentation |
| 2896 | (and first-run | 2887 | (save-excursion |
| 2897 | (< | 2888 | (and |
| 2898 | starting-point | 2889 | (python-nav-beginning-of-defun 1) |
| 2899 | (save-excursion | 2890 | ;; This extra number is just for checking code |
| 2900 | (python-end-of-defun-function) | 2891 | ;; against indentation to work well on first run. |
| 2901 | (point-marker))))) | 2892 | (+ (current-indentation) 4)))) |
| 2902 | (setq first-run nil) | 2893 | (starting-point (point))) |
| 2903 | (setq starting-indentation (current-indentation)) | 2894 | ;; Check point is inside a defun. |
| 2904 | (looking-at python-nav-beginning-of-defun-regexp) | 2895 | (when (and starting-indentation |
| 2905 | (setq names (cons | 2896 | (< starting-point |
| 2897 | (save-excursion | ||
| 2898 | (python-nav-end-of-defun) | ||
| 2899 | (point)))) | ||
| 2900 | (catch 'exit | ||
| 2901 | (while (python-nav-beginning-of-defun 1) | ||
| 2902 | (when (< (current-indentation) starting-indentation) | ||
| 2903 | (setq starting-indentation (current-indentation)) | ||
| 2904 | (setq names | ||
| 2905 | (cons | ||
| 2906 | (if (not include-type) | 2906 | (if (not include-type) |
| 2907 | (match-string-no-properties 1) | 2907 | (match-string-no-properties 1) |
| 2908 | (mapconcat 'identity | 2908 | (mapconcat 'identity |
| 2909 | (split-string | 2909 | (split-string |
| 2910 | (match-string-no-properties 0)) " ")) | 2910 | (match-string-no-properties 0)) " ")) |
| 2911 | names)))))) | 2911 | names))) |
| 2912 | (when names | 2912 | (and (= (current-indentation) 0) (throw 'exit t))))) |
| 2913 | (mapconcat (lambda (string) string) names ".")))) | 2913 | (and names |
| 2914 | (mapconcat (lambda (string) string) names ".")))))) | ||
| 2914 | 2915 | ||
| 2915 | (defun python-info-current-symbol (&optional replace-self) | 2916 | (defun python-info-current-symbol (&optional replace-self) |
| 2916 | "Return current symbol using dotty syntax. | 2917 | "Return current symbol using dotty syntax. |
| @@ -3200,9 +3201,9 @@ if that value is non-nil." | |||
| 3200 | 'python-fill-paragraph) | 3201 | 'python-fill-paragraph) |
| 3201 | 3202 | ||
| 3202 | (set (make-local-variable 'beginning-of-defun-function) | 3203 | (set (make-local-variable 'beginning-of-defun-function) |
| 3203 | #'python-beginning-of-defun-function) | 3204 | #'python-nav-beginning-of-defun) |
| 3204 | (set (make-local-variable 'end-of-defun-function) | 3205 | (set (make-local-variable 'end-of-defun-function) |
| 3205 | #'python-end-of-defun-function) | 3206 | #'python-nav-end-of-defun) |
| 3206 | 3207 | ||
| 3207 | (add-hook 'completion-at-point-functions | 3208 | (add-hook 'completion-at-point-functions |
| 3208 | 'python-completion-complete-at-point nil 'local) | 3209 | 'python-completion-complete-at-point nil 'local) |
| @@ -3230,7 +3231,7 @@ if that value is non-nil." | |||
| 3230 | (add-to-list 'hs-special-modes-alist | 3231 | (add-to-list 'hs-special-modes-alist |
| 3231 | `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" | 3232 | `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" |
| 3232 | ,(lambda (arg) | 3233 | ,(lambda (arg) |
| 3233 | (python-end-of-defun-function)) nil)) | 3234 | (python-nav-end-of-defun)) nil)) |
| 3234 | 3235 | ||
| 3235 | (set (make-local-variable 'mode-require-final-newline) t) | 3236 | (set (make-local-variable 'mode-require-final-newline) t) |
| 3236 | 3237 | ||
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index c9bfcefb748..67f25eda288 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -898,17 +898,7 @@ or blocks containing the current block." | |||
| 898 | (back-to-indentation) | 898 | (back-to-indentation) |
| 899 | (if (looking-at (concat "\\<\\(" ruby-block-mid-re "\\)\\>")) | 899 | (if (looking-at (concat "\\<\\(" ruby-block-mid-re "\\)\\>")) |
| 900 | (setq done nil))))) | 900 | (setq done nil))))) |
| 901 | (back-to-indentation) | 901 | (back-to-indentation))) |
| 902 | (when (< n 0) | ||
| 903 | (let ((eol (point-at-eol)) state next) | ||
| 904 | (if (< orig eol) (setq eol orig)) | ||
| 905 | (setq orig (point)) | ||
| 906 | (while (and (setq next (apply 'ruby-parse-partial eol state)) | ||
| 907 | (< (point) eol)) | ||
| 908 | (setq state next)) | ||
| 909 | (when (cdaadr state) | ||
| 910 | (goto-char (cdaadr state))) | ||
| 911 | (backward-word))))) | ||
| 912 | 902 | ||
| 913 | (defun ruby-beginning-of-block (&optional arg) | 903 | (defun ruby-beginning-of-block (&optional arg) |
| 914 | "Move backward to the beginning of the current block. | 904 | "Move backward to the beginning of the current block. |
diff --git a/lisp/window.el b/lisp/window.el index be6ddf8ab9e..30ee622cfe6 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -143,37 +143,36 @@ to `display-buffer'." | |||
| 143 | window)))) | 143 | window)))) |
| 144 | 144 | ||
| 145 | (defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body) | 145 | (defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body) |
| 146 | "Evaluate BODY and display buffer specified by BUFFER-OR-NAME. | 146 | "Evaluate BODY and display the buffer specified by BUFFER-OR-NAME. |
| 147 | BUFFER-OR-NAME must specify either a live buffer or the name of a | 147 | BUFFER-OR-NAME must specify either a live buffer, or the name of a |
| 148 | buffer. If no buffer with such a name exists, create one. | 148 | buffer (if it does not exist, this macro creates it). |
| 149 | 149 | ||
| 150 | Make sure the specified buffer is empty before evaluating BODY. | 150 | Make sure the specified buffer is empty before evaluating BODY. |
| 151 | Do not make that buffer current for BODY. Instead, bind | 151 | Do not make that buffer current for BODY. Instead, bind |
| 152 | `standard-output' to that buffer, so that output generated with | 152 | `standard-output' to that buffer, so that output generated with |
| 153 | `prin1' and similar functions in BODY goes into that buffer. | 153 | `prin1' and similar functions in BODY goes into that buffer. |
| 154 | 154 | ||
| 155 | After evaluating BODY, mark the specified buffer unmodified and | 155 | After evaluating BODY, this marks the specified buffer unmodified and |
| 156 | read-only, and display it in a window via `display-buffer'. Pass | 156 | read-only, and displays it in a window via `display-buffer', passing |
| 157 | ACTION as action argument to `display-buffer'. Automatically | 157 | ACTION as the action argument to `display-buffer'. It automatically |
| 158 | shrink the window used if `temp-buffer-resize-mode' is enabled. | 158 | shrinks the relevant window if `temp-buffer-resize-mode' is enabled. |
| 159 | 159 | ||
| 160 | Return the value returned by BODY unless QUIT-FUNCTION specifies | 160 | Returns the value returned by BODY, unless QUIT-FUNCTION specifies |
| 161 | a function. In that case, run the function with two arguments - | 161 | a function. In that case, runs the function with two arguments - |
| 162 | the window showing the specified buffer and the value returned by | 162 | the window showing the specified buffer and the value returned by |
| 163 | BODY - and return the value returned by that function. | 163 | BODY - and returns the value returned by that function. |
| 164 | 164 | ||
| 165 | If the buffer is displayed on a new frame, the window manager may | 165 | If the buffer is displayed on a new frame, the window manager may |
| 166 | decide to select that frame. In that case, it's usually a good | 166 | decide to select that frame. In that case, it's usually a good |
| 167 | strategy if the function specified by QUIT-FUNCTION selects the | 167 | strategy if the function specified by QUIT-FUNCTION selects the |
| 168 | window showing the buffer before reading a value from the | 168 | window showing the buffer before reading a value from the |
| 169 | minibuffer, for example, when asking a `yes-or-no-p' question. | 169 | minibuffer; for example, when asking a `yes-or-no-p' question. |
| 170 | 170 | ||
| 171 | This construct is similar to `with-output-to-temp-buffer' but | 171 | This construct is similar to `with-output-to-temp-buffer', but does |
| 172 | does neither put the buffer in help mode nor does it call | 172 | not put the buffer in help mode, or call `temp-buffer-show-function'. |
| 173 | `temp-buffer-show-function'. It also runs different hooks, | 173 | It also runs different hooks, namely `temp-buffer-window-setup-hook' |
| 174 | namely `temp-buffer-window-setup-hook' (with the specified buffer | 174 | \(with the specified buffer current) and `temp-buffer-window-show-hook' |
| 175 | current) and `temp-buffer-window-show-hook' (with the specified | 175 | \(with the specified buffer current and the window showing it selected). |
| 176 | buffer current and the window showing it selected). | ||
| 177 | 176 | ||
| 178 | Since this macro calls `display-buffer', the window displaying | 177 | Since this macro calls `display-buffer', the window displaying |
| 179 | the buffer is usually not selected and the specified buffer | 178 | the buffer is usually not selected and the specified buffer |
| @@ -6065,7 +6064,7 @@ A frame can be resized if and only if its root window is a live | |||
| 6065 | window. The height of the root window is subject to the values | 6064 | window. The height of the root window is subject to the values |
| 6066 | of `fit-frame-to-buffer-max-height' and `window-min-height'." | 6065 | of `fit-frame-to-buffer-max-height' and `window-min-height'." |
| 6067 | :type 'boolean | 6066 | :type 'boolean |
| 6068 | :version "24.2" | 6067 | :version "24.3" |
| 6069 | :group 'help) | 6068 | :group 'help) |
| 6070 | 6069 | ||
| 6071 | (defcustom fit-frame-to-buffer-bottom-margin 4 | 6070 | (defcustom fit-frame-to-buffer-bottom-margin 4 |
| @@ -6073,7 +6072,7 @@ of `fit-frame-to-buffer-max-height' and `window-min-height'." | |||
| 6073 | This is the number of lines `fit-frame-to-buffer' leaves free at the | 6072 | This is the number of lines `fit-frame-to-buffer' leaves free at the |
| 6074 | bottom of the display in order to not obscure the system task bar." | 6073 | bottom of the display in order to not obscure the system task bar." |
| 6075 | :type 'integer | 6074 | :type 'integer |
| 6076 | :version "24.2" | 6075 | :version "24.3" |
| 6077 | :group 'windows) | 6076 | :group 'windows) |
| 6078 | 6077 | ||
| 6079 | (defun fit-frame-to-buffer (&optional frame max-height min-height) | 6078 | (defun fit-frame-to-buffer (&optional frame max-height min-height) |
diff --git a/src/ChangeLog b/src/ChangeLog index 5905c667852..88352c201b6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-11-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument | ||
| 4 | passed to pint2str and pint2hrstr to be at most the size of the | ||
| 5 | frame's decode_mode_spec_buffer. This avoids crashes with very | ||
| 6 | large values of FIELD_WIDTH argument to decode_mode_spec. | ||
| 7 | (Bug#12867) | ||
| 8 | |||
| 1 | 2012-11-13 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2012-11-13 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 10 | ||
| 3 | Fix a race with verify-visited-file-modtime (Bug#12863). | 11 | Fix a race with verify-visited-file-modtime (Bug#12863). |
diff --git a/src/xdisp.c b/src/xdisp.c index 5bda3347fe8..12d7b89291c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -21371,6 +21371,12 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 21371 | Lisp_Object obj; | 21371 | Lisp_Object obj; |
| 21372 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 21372 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 21373 | char *decode_mode_spec_buf = f->decode_mode_spec_buffer; | 21373 | char *decode_mode_spec_buf = f->decode_mode_spec_buffer; |
| 21374 | /* We are going to use f->decode_mode_spec_buffer as the buffer to | ||
| 21375 | produce strings from numerical values, so limit preposterously | ||
| 21376 | large values of FIELD_WIDTH to avoid overrunning the buffer's | ||
| 21377 | end. The size of the buffer is enough for FRAME_MESSAGE_BUF_SIZE | ||
| 21378 | bytes plus the terminating null. */ | ||
| 21379 | int width = min (field_width, FRAME_MESSAGE_BUF_SIZE (f)); | ||
| 21374 | struct buffer *b = current_buffer; | 21380 | struct buffer *b = current_buffer; |
| 21375 | 21381 | ||
| 21376 | obj = Qnil; | 21382 | obj = Qnil; |
| @@ -21466,7 +21472,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 21466 | { | 21472 | { |
| 21467 | ptrdiff_t col = current_column (); | 21473 | ptrdiff_t col = current_column (); |
| 21468 | wset_column_number_displayed (w, make_number (col)); | 21474 | wset_column_number_displayed (w, make_number (col)); |
| 21469 | pint2str (decode_mode_spec_buf, field_width, col); | 21475 | pint2str (decode_mode_spec_buf, width, col); |
| 21470 | return decode_mode_spec_buf; | 21476 | return decode_mode_spec_buf; |
| 21471 | } | 21477 | } |
| 21472 | 21478 | ||
| @@ -21497,14 +21503,14 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 21497 | case 'i': | 21503 | case 'i': |
| 21498 | { | 21504 | { |
| 21499 | ptrdiff_t size = ZV - BEGV; | 21505 | ptrdiff_t size = ZV - BEGV; |
| 21500 | pint2str (decode_mode_spec_buf, field_width, size); | 21506 | pint2str (decode_mode_spec_buf, width, size); |
| 21501 | return decode_mode_spec_buf; | 21507 | return decode_mode_spec_buf; |
| 21502 | } | 21508 | } |
| 21503 | 21509 | ||
| 21504 | case 'I': | 21510 | case 'I': |
| 21505 | { | 21511 | { |
| 21506 | ptrdiff_t size = ZV - BEGV; | 21512 | ptrdiff_t size = ZV - BEGV; |
| 21507 | pint2hrstr (decode_mode_spec_buf, field_width, size); | 21513 | pint2hrstr (decode_mode_spec_buf, width, size); |
| 21508 | return decode_mode_spec_buf; | 21514 | return decode_mode_spec_buf; |
| 21509 | } | 21515 | } |
| 21510 | 21516 | ||
| @@ -21611,12 +21617,12 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 21611 | line_number_displayed = 1; | 21617 | line_number_displayed = 1; |
| 21612 | 21618 | ||
| 21613 | /* Make the string to show. */ | 21619 | /* Make the string to show. */ |
| 21614 | pint2str (decode_mode_spec_buf, field_width, topline + nlines); | 21620 | pint2str (decode_mode_spec_buf, width, topline + nlines); |
| 21615 | return decode_mode_spec_buf; | 21621 | return decode_mode_spec_buf; |
| 21616 | no_value: | 21622 | no_value: |
| 21617 | { | 21623 | { |
| 21618 | char* p = decode_mode_spec_buf; | 21624 | char* p = decode_mode_spec_buf; |
| 21619 | int pad = field_width - 2; | 21625 | int pad = width - 2; |
| 21620 | while (pad-- > 0) | 21626 | while (pad-- > 0) |
| 21621 | *p++ = ' '; | 21627 | *p++ = ' '; |
| 21622 | *p++ = '?'; | 21628 | *p++ = '?'; |
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index ba3040577b1..8da0041e9a4 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el | |||
| @@ -202,13 +202,13 @@ VALUES-PLIST is a list with alternating index and value elements." | |||
| 202 | | end | 202 | | end |
| 203 | |")) | 203 | |")) |
| 204 | 204 | ||
| 205 | (ert-deftest ruby-move-to-block-stops-at-opening () | 205 | (ert-deftest ruby-move-to-block-stops-at-indentation () |
| 206 | (with-temp-buffer | 206 | (with-temp-buffer |
| 207 | (insert "def f\nend") | 207 | (insert "def f\nend") |
| 208 | (beginning-of-line) | 208 | (beginning-of-line) |
| 209 | (ruby-mode) | 209 | (ruby-mode) |
| 210 | (ruby-move-to-block -1) | 210 | (ruby-move-to-block -1) |
| 211 | (should (looking-at "f$")))) | 211 | (should (looking-at "^def")))) |
| 212 | 212 | ||
| 213 | (ert-deftest ruby-toggle-block-to-do-end () | 213 | (ert-deftest ruby-toggle-block-to-do-end () |
| 214 | (with-temp-buffer | 214 | (with-temp-buffer |