Now on revision 110149. ------------------------------------------------------------ revno: 110149 fixes bug: http://debbugs.gnu.org/12462 committer: Juri Linkov branch nick: trunk timestamp: Sun 2012-09-23 01:57:11 +0300 message: * lisp/dired.el (dired-mode-map): Add [remap read-only-mode] for `dired-toggle-read-only'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 18:11:11 +0000 +++ lisp/ChangeLog 2012-09-22 22:57:11 +0000 @@ -1,3 +1,8 @@ +2012-09-22 Juri Linkov + + * dired.el (dired-mode-map): Add [remap read-only-mode] for + `dired-toggle-read-only'. (Bug#12462) + 2012-09-22 Martin Rudalics * subr.el (temp-output-buffer-show): New function. === modified file 'lisp/dired.el' --- lisp/dired.el 2012-09-20 21:57:13 +0000 +++ lisp/dired.el 2012-09-22 22:57:11 +0000 @@ -1493,6 +1493,8 @@ (define-key map (kbd "M-s f C-s") 'dired-isearch-filenames) (define-key map (kbd "M-s f M-C-s") 'dired-isearch-filenames-regexp) ;; misc + (define-key map [remap read-only-mode] 'dired-toggle-read-only) + ;; `toggle-read-only' is an obsolete alias for `read-only-mode' (define-key map [remap toggle-read-only] 'dired-toggle-read-only) (define-key map "?" 'dired-summary) (define-key map "\177" 'dired-unmark-backward) ------------------------------------------------------------ revno: 110148 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-22 13:35:46 -0700 message: * .gdbinit: Just stop at fatal_error_backtrace. See Stefan Monnier's request in . Remove no-longer-used query of system type. diff: === modified file 'src/.gdbinit' --- src/.gdbinit 2012-09-04 17:34:54 +0000 +++ src/.gdbinit 2012-09-22 20:35:46 +0000 @@ -1213,19 +1213,9 @@ show environment DISPLAY show environment TERM -# People get bothered when they see messages about non-existent functions... -xgetptr globals.f_Vsystem_type -# $ptr is NULL in temacs -if ($ptr != 0) - set $tem = (struct Lisp_Symbol *) $ptr - xgetptr $tem->name - set $tem = (struct Lisp_String *) $ptr - set $tem = (char *) $tem->data - - # Don't let emacs_abort actually run, as it will make stdio stop - # working and therefore the 'pr' command above as well. - break emacs_abort -end +# When debugging, it is handy to be able to "return" from +# fatal_error_backtrace when an assertion failure is non-fatal. +break fatal_error_backtrace # x_error_quitter is defined only on X. But window-system is set up # only at run time, during Emacs startup, so we need to defer setting === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-22 15:24:26 +0000 +++ src/ChangeLog 2012-09-22 20:35:46 +0000 @@ -1,3 +1,10 @@ +2012-09-22 Paul Eggert + + * .gdbinit: Just stop at fatal_error_backtrace. + See Stefan Monnier's request in + . + Remove no-longer-used query of system type. + 2012-09-22 Chong Yidong * search.c (Freplace_match): Doc fix (Bug#12325). ------------------------------------------------------------ revno: 110147 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-22 12:27:25 -0700 message: * trouble.texi (Crashing): Document ulimit -c. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-09-21 19:28:41 +0000 +++ doc/emacs/ChangeLog 2012-09-22 19:27:25 +0000 @@ -1,3 +1,7 @@ +2012-09-22 Paul Eggert + + * trouble.texi (Crashing): Document ulimit -c. + 2012-09-21 Paul Eggert * trouble.texi (Crashing): Document addr2line. === modified file 'doc/emacs/trouble.texi' --- doc/emacs/trouble.texi 2012-09-21 19:28:41 +0000 +++ doc/emacs/trouble.texi 2012-09-22 19:27:25 +0000 @@ -282,10 +282,15 @@ @subsection When Emacs Crashes Emacs is not supposed to crash, but if it does, before it exits it -reports some information about the crash to the standard error stream -@code{stderr}. This report may be useful to someone who later debugs -the same version of Emacs on the same platform. The format of this -report depends on the platform, and some platforms support backtraces. +reports a brief summary of the crash to the standard error stream +@code{stderr}. If enabled, a crashed Emacs also generates a core dump +containing voluminous data about the crash. On many platforms you can +enable core dumps by putting the shell command @samp{ulimit -c unlimited} +into your shell startup script. The crash report and core dump can be +used when debugging the same version of Emacs on the same platform. + +The format of the crash report depends on the platform, and some +platforms support backtraces. Here is an example, generated on x86-64 GNU/Linux with version 2.15 of the GNU C Library: ------------------------------------------------------------ revno: 110146 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-22 11:11:11 -0700 message: ChangeLog typo fix (not that I remember suggesting anything...) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 16:28:46 +0000 +++ lisp/ChangeLog 2012-09-22 18:11:11 +0000 @@ -36,7 +36,7 @@ * help.el (temp-buffer-resize-regexps): New option. (temp-buffer-resize-mode): Rewrite doc-string. (resize-temp-buffer-window): Obey temp-buffer-resize-regexps. - Don't resize reused window. Suggested by Glen Morris. + Don't resize reused window. Suggested by Glenn Morris. 2012-09-22 Stefan Merten ------------------------------------------------------------ revno: 110145 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-09-23 01:19:28 +0800 message: Re-arrange and edit NEWS. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-09-22 12:56:08 +0000 +++ etc/NEWS 2012-09-22 17:19:28 +0000 @@ -86,9 +86,21 @@ * Changes in Emacs 24.3 -** You can now scroll the selected window in most y-or-n prompts. -Typing C-v or M-v at a prompt scrolls forward or backward -respectively, without leaving the y-or-n prompt. +** Most y-or-n prompts now allow you to scroll the selected window. +Typing C-v or M-v at a y-or-n prompt scrolls forward or backward +respectively, without exiting from the prompt. + +** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the +next and previous path separator, respectively. + +** Mode line changes + +*** New option `mode-line-default-help-echo' specifies the help text +(shown in a tooltip or in the echo area) for any part of the mode line +that does not have its own specialized help text. + +*** You can now click mouse-3 in the coding system indicator to +invokes `set-buffer-file-coding-system'. ** Help changes @@ -102,29 +114,6 @@ even after their associated libraries have been loaded (and the autoloads have been redefined as functions). -** The function `current-time' now returns extended-format time stamps -(HIGH LOW USEC PSEC) that use picosecond resolution; the PSEC -component is new. PSEC is typically a multiple of 1000 on current -machines. Other functions that use this format, such as -file-attributes and format-time-string, have been changed accordingly. -Old-format time stamps are still accepted. - -** The format of timers in timer-list and timer-idle-list is now -[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS]. -The PSECS slot is new, and uses picosecond resolution. It can be -accessed via the new timer--psecs accessor. - -** Emacs now generates backtraces on fatal errors. -On encountering a fatal error, Emacs now outputs a textual description -of the fatal signal, and a short backtrace on platforms like glibc -that support backtraces. - -** New functions `system-users', `system-groups' return lists of the user -name, group names known to the system (where possible). - -** If your Emacs was built from a bzr checkout, the new variable -`emacs-bzr-version' contains information about which bzr revision was used. - ** ImageMagick support, if available, is automatically enabled. It is no longer necessary to call `imagemagick-register-types' explicitly to install ImageMagick image types; that function is called @@ -143,125 +132,136 @@ *** Images displayed via ImageMagick now support transparency and the :background image spec property. -** Internationalization changes - -*** New language environment: Persian. - -** Face underlining can now use a wave. -See the "Face Attributes" section of the Elisp manual. - -** New fringe bitmap exclamation-mark. - -** String values for `initial-buffer-choice' also apply to emacsclient -frames, if emacsclient is only told to open a new frame without -specifying any file to visit or expression to evaluate. +** Server and client changes + +*** emacsclient now obeys string values for `initial-buffer-choice', +if it is told to open a new frame without specifying any file to visit +or expression to evaluate. + +*** New option `server-auth-key' specifies a shared server key. + +** In the Package Menu, newly-available packages are listed as "new", +and sorted above the other "available" packages by default. + +** `C-x C-q' is now bound to the new minor mode `read-only-mode'. +This minor mode replaces `toggle-read-only', which is now obsolete. + +** Emacs now generates backtraces on fatal errors. +On encountering a fatal error, Emacs now outputs a textual description +of the fatal signal, and a short backtrace on platforms like glibc +that support backtraces. + +** If your Emacs was built from a bzr checkout, the new variable +`emacs-bzr-version' contains information about the bzr revision used. +++ -** You can prevent the creation of lock files by setting `create-lockfiles' -to nil. Use with caution, and only if you really need to. +** New variable `create-lockfiles' specifies usage of lockfiles. +It defaults to t. Changing it to nil inhibits the creation of lock +files (use this with caution). +++ ** Using "unibyte: t" in Lisp source files is obsolete. Use "coding: raw-text" instead. -** Mode line changes - -*** New option `mode-line-default-help-echo' specifies the help text -(shown in a tooltip or in the echo area) for any part of the mode line -that does not have its own specialized help text. - -*** You can now click mouse-3 in the coding system indicator to -invokes `set-buffer-file-coding-system'. - +++ ** Setting `enable-remote-dir-locals' to non-nil allows directory local variables on remote hosts. -+++ -** `insert-char' is now a command, and `ucs-insert' an obsolete alias -for it. - +--- ** The entry for PCL-CVS has been removed from the Tools menu. The PCL-CVS commands are still available via the keyboard. +** Internationalization changes +--- +*** New language environment: Persian. +--- +*** New input method `vietnamese-vni'. + * Editing Changes in Emacs 24.3 ++++ +** `C-x 8 RET' is now bound to `insert-char', which is now a command. +`ucs-insert' is now an obsolete alias for `insert-char'. + +--- ** The `z' key no longer has a binding in most special modes. It used to be bound to `kill-this-buffer', but `z' is too easy to accidentally type. -** New option `yank-handled-properties' allows processing of text -properties on yanked text, in more ways that are more general than -just removing them, as done by `yank-excluded-properties'. - -** New option `delete-trailing-lines' specifies whether the M-x -delete-trailing-whitespace command should delete trailing lines at the -end of the buffer. It defaults to t. - -+++ -** `C-x r +' is now overloaded to invoke `append-to-register. - -+++ -** New option `register-separator' specifies the register containing -the text to put between collected texts for use with M-x -append-to-register and M-x prepend-to-register. - -** Search changes +** New option `delete-trailing-lines' specifies whether +M-x delete-trailing-whitespace should delete trailing lines at the end +of the buffer. It defaults to t. + +** Search and Replace changes + +*** Non-regexp Isearch now performs "lax" space matching. +Each sequence of spaces in the supplied search string may match any +sequence of one or more whitespace characters, as specified by the +variable `search-whitespace-regexp'. (This variable is also used by a +similar existing feature for regexp Isearch). + +*** New Isearch command `M-s SPC' toggles lax space matching. +This applies to both ordinary and regexp Isearch. + +*** New option `replace-lax-whitespace'. +If non-nil, `query-replace' uses flexible whitespace matching too. +The default is nil. *** Global `M-s _' starts a symbol (identifier) incremental search, and `M-s _' in Isearch toggles symbol search mode. `M-s c' in Isearch toggles search case-sensitivity. -*** `M-s SPC' in Isearch toggles whitespace matching mode -in both ordinary and regexp incremental search, so that each -sequence of spaces in the search string matches any combination -of one or more whitespace characters defined by the variable -`search-whitespace-regexp'. In ordinary incremental search, -`isearch-toggle-lax-whitespace' toggles the value of the variable -`isearch-lax-whitespace'. In regexp incremental search, it toggles -the value of the variable `isearch-regexp-lax-whitespace'. - -** query-replace changes - -*** When new option `replace-lax-whitespace' is non-nil, -and you enter a space or spaces in the strings or regexps -to be replaced, `query-replace' will match any sequence matched -by the regexp `search-whitespace-regexp'. +** Register changes ++++ +*** `C-x r +' is now overloaded to invoke `append-to-register. ++++ +*** New option `register-separator' specifies the register containing +the text to put between collected texts for use with M-x +append-to-register and M-x prepend-to-register. + +** `C-u M-=' now counts lines/words/characters in the entire buffer. + +** New binding `M-g c' for `goto-char'. ** M-x move-to-column, if called interactively with no prefix arg, now prompts for a column number. -** `mouse-avoidance-banish-position' can now be used to customize -`mouse-avoidance-mode' further. - -** `C-u M-=' now counts lines/words/characters in the entire buffer. - -** `C-M-f' and `C-M-b' will now move to the path name separator -character when doing minibuffer filename prompts. - -** `goto-char' is now bound to `M-g c'. - ** New command `C-x r M-w' (copy-rectangle-as-kill). It copies the region-rectangle as the last rectangle kill. -** New input method `vietnamese-vni'. +** New option `yank-handled-properties' allows processing of text +properties on yanked text, in more ways that are more general than +just removing them, as done by `yank-excluded-properties'. * Changes in Specialized Modes and Packages in Emacs 24.3 -** Compilation has a new `compilation-always-kill' configuration variable. - -** Term changes - -The variables `term-default-fg-color' and `term-default-bg-color' are -now deprecated in favor of the `term-face' face, that you can -customize. Also, it is now possible to customize how are displayed the -ANSI terminal colors and styles by customizing the corresponding -`term-color-', `term-color-underline' and `term-color-bold' -faces. +** Apropos + +*** The faces used by Apropos are now directly customizable. +These faces are named `apropos-symbol', `apropos-keybinding', and so on; +see the `apropos' Custom group for details. + +**** The old options whose values specified faces to use were removed +(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.). + +** Buffer Menu +This package has been rewritten to use Tabulated List mode. + +*** Option `Buffer-menu-buffer+size-width' is now obsolete. +Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead. + +** Calendar + +*** You can customize the header text that appears above each calendar month. +See the variable `calendar-month-header'. + +*** The calendars produced by cal-html include holidays. +Customize cal-html-holidays to change this. ** CL + *** CL's main entry is now (require 'cl-lib). `cl-lib' is like the old `cl' except that it uses the namespace cleanly, i.e. all its definitions have the "cl-" prefix (and internal definitions use @@ -287,11 +287,129 @@ A side effect is that vars without corresponding value are bound to nil rather than making them unbound. +** Compilation mode + +*** New option `compilation-always-kill'. + +** Customize + +*** `custom-reset-button-menu' now defaults to t. + +*** Non-option variables are never matched in `customize-apropos' and +`customize-apropos-options' (i.e. the prefix argument does nothing for +these commands now). + ** Desktop *** `desktop-path' no longer includes the "." directory. Desktop files are now located in ~/.emacs.d by default. +** D-Bus + ++++ +*** New variables `dbus-compiled-version' and `dbus-runtime-version'. + ++++ +*** The D-Bus object manager interface is implemented. + ++++ +*** Variables of type :(u)int32 and :(u)int64 accept floating points, +if their value does not fit into Emacs's integer range. + ++++ +*** The function `dbus-call-method' works non-blocking now, it can be +interrupted by C-g. `dbus-call-method-non-blocking' is obsolete. + ++++ +*** Signals can be sent also as unicast message. + ++++ +*** The argument list of `dbus-register-signal' has been extended, +according to the new match rule types of D-Bus. See the manual for +details. + ++++ +*** `dbus-init-bus' supports private connections. + ++++ +*** There is a new function `dbus-setenv'. + +** Diff mode + +*** Changes are now highlighted using the same color scheme as in +modern VCSes. Deletions are displayed in red (new faces +`diff-refine-removed' and `smerge-refined-removed' and new definition +of `diff-removed'), insertions in green (new faces `diff-refine-added' +and `smerge-refined-added' and new definition of `diff-added'). + +*** The variable `diff-use-changed-face' defines whether to use the +face `diff-changed', or `diff-removed' and `diff-added' to highlight +changes in context diffs. + +*** The new command `diff-remove-trailing-whitespace' fixes trailing +whitespace problems introduced by the diff. + +** Dired + +*** `dired-do-async-shell-command' executes each file sequentially +if the command ends in `;' (when operating on multiple files). +Otherwise, it executes the command on each file in parallel. + +*** Typing M-n in the minibuffer of `dired-do-chmod', `dired-do-chgrp', +`dired-do-chown', `dired-do-touch' pulls the file attributes of the +file at point. + +*** When the region is active, `m' (`dired-mark'), `u' (`dired-unmark'), +`DEL' (`dired-unmark-backward'), `d' (`dired-flag-file-deletion') +mark/unmark/flag all files in the active region. + +*** The minibuffer default for `=' (`dired-diff) has changed. +It is now the backup file for the file at point, if one exists. +In Transient Mark mode the default is the file at the active mark. + +*** `M-=' is no longer bound to `dired-backup-diff' in Dired buffers. +The global binding for `M-=', `count-words-region' is in effect. + +** Ediff now uses the same color scheme as Diff mode. + +** erc will look up server/channel names via auth-source and use the +channel keys found, if any. + +** Flymake uses fringe bitmaps to indicate errors and warnings. +See flymake-fringe-indicator-position, flymake-error-bitmap and +flymake-warning-bitmap. + +** Follow mode + +*** The obsolete variable `follow-mode-off-hook' has been removed. + +*** Follow mode no longer works by using advice. +The option `follow-intercept-processes' has been removed. + +** FFAP + +*** The option `ffap-url-unwrap-remote' can now be a list of strings, +specifying URL types which should be converted to remote file names at +the FFAP prompt. The default is now '("ftp"). + +** Ibuffer + +*** New `derived-mode' filter, bound to `/ M'. +The old binding for `/ M' (filter by used-mode) is now bound to `/ m'. + +** Mouse Avoidance mode + +The new variable `mouse-avoidance-banish-position' can now be used to +customize Mouse Avoidance mode further. + ++++ +** notifications.el supports now version 1.2 of the Notifications API. +The function `notifications-get-capabilities' returns the supported +server properties. + +** In Perl mode, new option `perl-indent-parens-as-block' causes non-block +closing brackets to be aligned with the line of the opening bracket. + ** Python mode A new version of python.el, which provides several new features, including: @@ -347,50 +465,6 @@ python-switch-to-python | python-shell-switch-to-shell python-describe-symbol | python-eldoc-at-point -** VHDL mode - -*** The free software compiler GHDL is supported (and now the default). - -*** Support for the VHDL-AMS packages has been added/updated. - -*** Updated to the 2002 revision of the VHDL standard. - -*** Accepts \r and \f as whitespace. - -** SQL Mode - -*** DB2 added `sql-db2-escape-newlines' - -If non-nil, newlines sent to the command interpreter will be escaped -by a backslash. The default does not escape the newlines and assumes -that the sql statement will be terminated by a semicolon. - -** Diff mode - -Faces for changes now use the same diff color scheme as in modern VCSes -where deletions are displayed in red (new faces `diff-refine-removed' -and `smerge-refined-removed' and new definition of `diff-removed'), -insertions in green (new faces `diff-refine-added' and -`smerge-refined-added' and new definition of `diff-added'). -The variable `diff-use-changed-face' defines whether to use -the face `diff-changed', or `diff-removed' and `diff-added' -to highlight changes in context diffs. - -*** The new command `diff-remove-trailing-whitespace' fixes trailing -whitespace problems introduced by the diff. - -** Ediff now uses the same color scheme as Diff mode -on high color displays. - -** Flymake uses fringe bitmaps to indicate errors and warnings. -See flymake-fringe-indicator-position, flymake-error-bitmap and -flymake-warning-bitmap. - -** `sh-script' -*** Pairing of parens/quotes uses electric-pair-mode instead of skeleton-pair. -*** `sh-electric-here-document-mode' now controls auto-insertion of here-docs. -*** `sh-use-smie' lets you choose a new indentation and navigation code. - ** reStructuredText mode *** Rebind nearly all keys making room for more keys and complying @@ -421,63 +495,13 @@ *** Support `imenu' and `which-func'. -** New `derived-mode' filter for Ibuffer, bound to `/ M'. -`/ m' is now bound to filter by used-mode, which used to be bound to `/ M'. - -** Apropos - -*** The faces used by Apropos are now directly customizable. -These faces are named `apropos-symbol', `apropos-keybinding', and so on; -see the `apropos' Custom group for details. - -**** The old options whose values specified faces to use were removed -(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.). - -** Buffer Menu -This package has been rewritten to use Tabulated List mode. - -*** Option `Buffer-menu-buffer+size-width' is now obsolete. -Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead. - -** Calendar - -*** You can customize the header text that appears above each calendar month. -See the variable `calendar-month-header'. - -*** The calendars produced by cal-html include holidays. -Customize cal-html-holidays to change this. - -** Customize - -*** `custom-reset-button-menu' now defaults to t. - -*** Non-option variables are never matched in `customize-apropos' and -`customize-apropos-options' (i.e. the prefix argument does nothing for -these commands now). - -** erc will look up server/channel names via auth-source and use the -channel keys found, if any. - -** Dired - -*** `dired-do-async-shell-command' executes each file sequentially -if the command ends in `;' (when operating on multiple files). -Otherwise, it executes the command on each file in parallel. - -*** Typing M-n in the minibuffer of `dired-do-chmod', `dired-do-chgrp', -`dired-do-chown', `dired-do-touch' pulls the file attributes of the -file at point. - -*** When the region is active, `m' (`dired-mark'), `u' (`dired-unmark'), -`DEL' (`dired-unmark-backward'), `d' (`dired-flag-file-deletion') -mark/unmark/flag all files in the active region. - -*** The minibuffer default for `=' (`dired-diff) has changed. -It is now the backup file for the file at point, if one exists. -In Transient Mark mode the default is the file at the active mark. - -*** `M-=' is no longer bound to `dired-backup-diff' in Dired buffers. -The global binding for `M-=', `count-words-region' is in effect. +** SH Script mode + +*** Pairing of parens/quotes uses electric-pair-mode instead of skeleton-pair. + +*** `sh-electric-here-document-mode' now controls auto-insertion of here-docs. + +*** `sh-use-smie' lets you choose a new indentation and navigation code. ** Shell @@ -485,83 +509,35 @@ for a new asynchronous shell command when the default output buffer `*Async Shell Command*' is already taken by another running command. -** FFAP - -*** The option `ffap-url-unwrap-remote' can now be a list of strings, -specifying URL types which should be converted to remote file names at -the FFAP prompt. The default is now '("ftp"). - -** Follow mode - -*** The obsolete variable `follow-mode-off-hook' has been removed. - -*** Follow mode no longer works by using advice. -The option `follow-intercept-processes' has been removed. - -** The `server-auth-key' variable can be used to set a permanent -shared key for Emacs Server. - -** In Perl mode, new option `perl-indent-parens-as-block' causes non-block -closing brackets to be aligned with the line of the opening bracket. - -** FIXME something happened to ses.el, 2012-04-17. - -** which-function-mode now applies to all applicable major modes by default. +** SQL Mode + +*** DB2 added `sql-db2-escape-newlines' + +If non-nil, newlines sent to the command interpreter will be escaped +by a backslash. The default does not escape the newlines and assumes +that the sql statement will be terminated by a semicolon. + +** Tabulated List and packages derived from it + +*** New command `tabulated-list-sort', bound to `S', sorts the column +at point, or the Nth column if a numeric prefix argument is given. + +** Term + +The variables `term-default-fg-color' and `term-default-bg-color' are +now deprecated in favor of the `term-face' face, that you can +customize. Also, it is now possible to customize how are displayed the +ANSI terminal colors and styles by customizing the corresponding +`term-color-', `term-color-underline' and `term-color-bold' +faces. ** Tramp - +++ *** The syntax has been extended in order to allow ad-hoc proxy definitions. See the manual for details. - +++ *** Remote processes are now supported also on remote Windows host. -** D-Bus - -+++ -*** New variables `dbus-compiled-version' and `dbus-runtime-version'. - -+++ -*** The D-Bus object manager interface is implemented. - -+++ -*** Variables of type :(u)int32 and :(u)int64 accept floating points, -if their value does not fit into Emacs's integer range. - -+++ -*** The function `dbus-call-method' works non-blocking now, it can be -interrupted by C-g. `dbus-call-method-non-blocking' is obsolete. - -+++ -*** Signals can be sent also as unicast message. - -+++ -*** The argument list of `dbus-register-signal' has been extended, -according to the new match rule types of D-Bus. See the manual for -details. - -+++ -*** `dbus-init-bus' supports private connections. - -+++ -*** There is a new function `dbus-setenv'. - -+++ -** notifications.el supports now version 1.2 of the Notifications API. -The function `notifications-get-capabilities' returns the supported -server properties. - -** Package Menu - -*** Newly-available packages are listed in the Package Menu as "new", -and sorted above the other "available" packages by default. - -** Tabulated List and packages derived from it - -*** New command `tabulated-list-sort', bound to `S', sorts the column -at point, or the Nth column if a numeric prefix argument is given. - ** URL *** Structs made by `url-generic-parse-url' have nil `attributes' slot. @@ -574,6 +550,22 @@ The `url-retrieve' function now uses this to encode its URL argument, in case that is not properly encoded. +** VHDL mode + +*** The free software compiler GHDL is supported (and now the default). + +*** Support for the VHDL-AMS packages has been added/updated. + +*** Updated to the 2002 revision of the VHDL standard. + +*** Accepts \r and \f as whitespace. + +** which-function-mode now applies to all applicable major modes by default. + + +** FIXME something happened to ses.el, 2012-04-17. + + ** Obsolete packages: *** assoc.el @@ -660,7 +652,7 @@ **** inactivate-current-input-method-function -> deactivate-current-input-method-function -** The following obsolete variables and varaliases have been removed: +** Some obsolete variables and variable aliases were removed: *** `facemenu-unlisted-faces' *** `rmail-decode-mime-charset' @@ -669,39 +661,25 @@ * Lisp changes in Emacs 24.3 -** Interpreted files get eagerly macro-expanded during load. -This can significantly speed up execution of non-byte-compiled code, but can -also bump into harmless and previously unnoticed cyclic dependencies. -These should not be fatal: they will simply cause the macro-calls to be left -for later expansion (as before), but will also result in a warning describing -the cycle. - -** New minor mode `read-only-mode' to replace toggle-read-only (now obsolete). - -** New functions `autoloadp' and `autoload-do-load'. - -** New function `posnp' to test if an object is a `posn'. - -** `function-get' fetches the property of a function, following aliases. - -** `toggle-read-only' accepts a second argument specifying whether to -print a message, if called from Lisp. - ** CL-style generalized variables are now in core Elisp. -`setf' is autoloaded and `push' and `pop' accept generalized variables. +`setf' is autoloaded; `push' and `pop' accept generalized variables. ** `defun' also accepts a (declare DECLS) form, like `defmacro'. The interpretation of the DECLS is determined by `defun-declarations-alist'. -** `macro-declaration-function' is obsolete, use `macro-declarations-alist'. - -** New function `set-temporary-overlay-map'. - -** New macros `setq-local' and `defvar-local'. - -** New error type and new function `user-error'. Doesn't trigger the debugger. - -** Debugger +** Completion + +*** New function `completion-table-with-quoting' to handle completion +in the presence of quoting, such as file completion in shell buffers. + +*** New function `completion-table-subvert' to use an existing completion +table, but with a different prefix. + +** Debugger changes + +*** New error type and new function `user-error'. +These do not trigger the debugger. + *** New option `debugger-bury-or-kill'. *** Set `debug-on-message' to enter the debugger when a certain @@ -711,8 +689,13 @@ *** New var `inhibit-debugger', automatically set to prevent accidental recursive invocations. -+++ -** New utility function `buffer-narrowed-p'. +** Minibuffer + +*** `read-regexp' has a new argument HISTORY; the first argument PROMPT +of `read-regexp' accepts a string ending with a colon and space, and its +second argument DEFAULTS can be a list of strings accessible via M-n +in the minibuffer ahead of other hard-coded useful regexp-related values. +More commands use `read-regexp' now to read their regexp arguments. ** Window changes @@ -756,43 +739,64 @@ **** `special-display-function' **** `display-buffer-function' -** Minibuffer - -*** `read-regexp' has a new argument HISTORY; the first argument PROMPT -of `read-regexp' accepts a string ending with a colon and space, and its -second argument DEFAULTS can be a list of strings accessible via M-n -in the minibuffer ahead of other hard-coded useful regexp-related values. -More commands use `read-regexp' now to read their regexp arguments. - -** Completion - -*** New function `completion-table-with-quoting' to handle completion -in the presence of quoting, such as file completion in shell buffers. - -*** New function `completion-table-subvert' to use an existing completion -table, but with a different prefix. - ** Time *** `current-time-string' no longer requires that its argument's year must be in the range 1000..9999. It now works with any year supported by the underlying C implementation. -** Floating point - -*** When floating point functions such as `log' are given invalid -arguments, e.g., (log -1.0), they now uniformly return special values -such as NaNs instead of signaling errors. Previously, these functions -returned NaNs on some platforms but signaled errors on others. The affected -functions are acos, asin, tan, exp, expt, log, log10, sqrt, and mod. - -** New function file-name-base. - -** New function `tty-top-frame' returns the topmost frame of a text terminal. - -** `automount-dir-prefix' is obsolete. -** `buffer-has-markers-at' is obsolete. -** `window-system-version' is obsolete. +*** `current-time' now returns extended-format time stamps +(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds. +PSEC is typically a multiple of 1000 on current machines. Other +functions that use this format, such as file-attributes and +format-time-string, have been changed accordingly. Old-format time +stamps are still accepted. + +*** The format of timers in timer-list and timer-idle-list is now +[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS]. +The PSECS slot is new, and uses picosecond resolution. It can be +accessed via the new timer--psecs accessor. + +** Floating point functions now always return special values like NaN, +instead of signaling errors, if given invalid args, e.g. (log -1.0). +Previously, they returned NaNs on some platforms but signaled errors +on others. The affected functions are acos, asin, tan, exp, expt, +log, log10, sqrt, and mod. + +** Interpreted files are eagerly macro-expanded during load. +This can significantly speed up execution of non-byte-compiled code, +but can also bump into harmless and previously unnoticed cyclic +dependencies. These should not be fatal: they will simply cause the +macro-calls to be left for later expansion (as before), but will also +result in a warning describing the cycle. + +** Misc new functions: + +*** `autoloadp' +*** `autoload-do-load'. +*** `buffer-narrowed-p' tests if the buffer is narrowed. +*** `file-name-base' returns a file name sans directory and extension. +*** `function-get' fetches a function property, following aliases. +*** `posnp' tests if an object is a `posn'. +*** `set-temporary-overlay-map' sets up a temporary overlay map. +*** `system-users' returns the user names on the system. +*** `system-groups' returns the group names on the system. +*** `tty-top-frame' returns the topmost frame of a text terminal. + +** New macros `setq-local' and `defvar-local'. + +** New fringe bitmap exclamation-mark. + +** Face underlining can now use a wave. +See the "Face Attributes" section of the Elisp manual. + +** The following functions and variables are obsolete: + +*** `automount-dir-prefix' +*** `buffer-has-markers-at' +*** `macro-declaration-function' (use `macro-declarations-alist'). +*** `window-system-version' + * Changes in Emacs 24.3 on non-free operating systems ------------------------------------------------------------ revno: 110144 committer: martin rudalics branch nick: trunk timestamp: Sat 2012-09-22 18:28:46 +0200 message: Implement temp-output-buffer-show in subr.el. * subr.el (temp-output-buffer-show): New function. (with-output-to-temp-buffer): Call temp-output-buffer-show instead of internal-temp-output-buffer-show. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 15:46:57 +0000 +++ lisp/ChangeLog 2012-09-22 16:28:46 +0000 @@ -1,3 +1,9 @@ +2012-09-22 Martin Rudalics + + * subr.el (temp-output-buffer-show): New function. + (with-output-to-temp-buffer): Call temp-output-buffer-show + instead of internal-temp-output-buffer-show. + 2012-09-22 Chong Yidong * files.el (ctl-x-map): Bind C-x C-q to read-only-mode === modified file 'lisp/subr.el' --- lisp/subr.el 2012-09-21 03:03:48 +0000 +++ lisp/subr.el 2012-09-22 16:28:46 +0000 @@ -3138,6 +3138,45 @@ (unwind-protect (progn ,@body) (set-window-configuration ,c))))) +(defun temp-output-buffer-show (buffer) + "Internal function for `with-output-to-temp-buffer'." + (with-current-buffer buffer + (set-buffer-modified-p nil) + (goto-char (point-min))) + + (if temp-buffer-show-function + (funcall temp-buffer-show-function buffer) + (with-current-buffer buffer + (let* ((window + (let ((window-combination-limit + ;; When `window-combination-limit' equals + ;; `temp-buffer' or `temp-buffer-resize' and + ;; `temp-buffer-resize-mode' is enabled in this + ;; buffer bind it to t so resizing steals space + ;; preferably from the window that was split. + (if (or (eq window-combination-limit 'temp-buffer) + (and (eq window-combination-limit + 'temp-buffer-resize) + temp-buffer-resize-mode)) + t + window-combination-limit))) + (display-buffer buffer))) + (frame (and window (window-frame window)))) + (when window + (unless (eq frame (selected-frame)) + (make-frame-visible frame)) + (setq minibuffer-scroll-window window) + (set-window-hscroll window 0) + ;; Don't try this with NOFORCE non-nil! + (set-window-start window (point-min) t) + ;; This hould not be necessary. + (set-window-point window (point-min)) + ;; Run `temp-buffer-show-hook', with the chosen window selected. + (with-selected-window window + (run-hooks 'temp-buffer-show-hook)))))) + ;; Return nil. + nil) + (defmacro with-output-to-temp-buffer (bufname &rest body) "Bind `standard-output' to buffer BUFNAME, eval BODY, then show that buffer. @@ -3183,7 +3222,7 @@ (run-hooks 'temp-buffer-setup-hook))))) (standard-output ,buf)) (prog1 (progn ,@body) - (internal-temp-output-buffer-show ,buf))))) + (temp-output-buffer-show ,buf))))) (defmacro with-temp-file (file &rest body) "Create a new buffer, evaluate BODY there, and write the buffer to FILE. ------------------------------------------------------------ revno: 110143 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-09-22 23:46:57 +0800 message: * simple.el (read-only-mode): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 15:44:43 +0000 +++ lisp/ChangeLog 2012-09-22 15:46:57 +0000 @@ -9,6 +9,7 @@ (Bug#10909). * simple.el (shell-command-on-region): Doc fix. + (read-only-mode): Doc fix. 2012-09-22 Eli Zaretskii === modified file 'lisp/simple.el' --- lisp/simple.el 2012-09-22 15:24:26 +0000 +++ lisp/simple.el 2012-09-22 15:46:57 +0000 @@ -6971,7 +6971,7 @@ and `view-read-only' is non-nil, enter view mode. Do not call this from a Lisp program unless you really intend to -do the same thing as the \\[toggle-read-only] command, including +do the same thing as the \\[read-only-mode] command, including possibly enabling or disabling View mode. Also, note that this command works by setting the variable `buffer-read-only', which does not affect read-only regions caused by text properties. To ------------------------------------------------------------ revno: 110142 fixes bug: http://debbugs.gnu.org/12462 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-09-22 23:44:43 +0800 message: * files.el (ctl-x-map): Bind C-x C-q to read-only-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 15:24:26 +0000 +++ lisp/ChangeLog 2012-09-22 15:44:43 +0000 @@ -1,5 +1,8 @@ 2012-09-22 Chong Yidong + * files.el (ctl-x-map): Bind C-x C-q to read-only-mode + (Bug#12462). + * repeat.el (repeat): Doc fix (Bug#12348). * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix === modified file 'lisp/files.el' --- lisp/files.el 2012-09-16 15:57:28 +0000 +++ lisp/files.el 2012-09-22 15:44:43 +0000 @@ -6714,7 +6714,7 @@ (define-key esc-map "~" 'not-modified) (define-key ctl-x-map "\C-d" 'list-directory) (define-key ctl-x-map "\C-c" 'save-buffers-kill-terminal) -(define-key ctl-x-map "\C-q" 'toggle-read-only) +(define-key ctl-x-map "\C-q" 'read-only-mode) (define-key ctl-x-4-map "f" 'find-file-other-window) (define-key ctl-x-4-map "r" 'find-file-read-only-other-window) ------------------------------------------------------------ revno: 110141 fixes bugs: http://debbugs.gnu.org/12325 http://debbugs.gnu.org/12391 http://debbugs.gnu.org/12416 http://debbugs.gnu.org/12414 http://debbugs.gnu.org/10909 http://debbugs.gnu.org/12348 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-09-22 23:24:26 +0800 message: Misc doc fixes. * searching.texi (Replacing Match): Minor clarification. * lisp/repeat.el (repeat): Doc fix. * lisp/simple.el (shell-command-on-region): Doc fix. * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. * cmds.c (Fforward_char, Fbackward_char): Doc fix. * editfns.c (Fline_beginning_position): Doc fix. (Fline_end_position): Doc fix. * minibuf.c (Finternal_complete_buffer): Doc fix. * search.c (Freplace_match): Doc fix. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-09-22 13:24:58 +0000 +++ doc/lispref/ChangeLog 2012-09-22 15:24:26 +0000 @@ -1,3 +1,7 @@ +2012-09-22 Chong Yidong + + * searching.texi (Replacing Match): Minor clarification. + 2012-09-22 Eli Zaretskii * edebug.texi (Instrumenting): Improve indexing. === modified file 'doc/lispref/searching.texi' --- doc/lispref/searching.texi 2012-09-09 06:43:47 +0000 +++ doc/lispref/searching.texi 2012-09-22 15:24:26 +0000 @@ -1278,20 +1278,18 @@ @cindex case in replacements @defun replace-match replacement &optional fixedcase literal string subexp -This function replaces the text in the buffer (or in @var{string}) that -was matched by the last search. It replaces that text with -@var{replacement}. - -If you did the last search in a buffer, you should specify @code{nil} -for @var{string} and make sure that the current buffer when you call -@code{replace-match} is the one in which you did the searching or -matching. Then @code{replace-match} does the replacement by editing -the buffer; it leaves point at the end of the replacement text, and -returns @code{t}. - -If you did the search in a string, pass the same string as @var{string}. -Then @code{replace-match} does the replacement by constructing and -returning a new string. +This function performs a replacement operation on a buffer or string. + +If you did the last search in a buffer, you should omit the +@var{string} argument or specify @code{nil} for it, and make sure that +the current buffer is the one in which you performed the last search. +Then this function edits the buffer, replacing the matched text with +@var{replacement}. It leaves point at the end of the replacement +text, and returns @code{t}. + +If you performed the last search on a string, pass the same string as +@var{string}. Then this function returns a new string, in which the +matched text is replaced by @var{replacement}. If @var{fixedcase} is non-@code{nil}, then @code{replace-match} uses the replacement text without case conversion; otherwise, it converts === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 13:16:03 +0000 +++ lisp/ChangeLog 2012-09-22 15:24:26 +0000 @@ -1,3 +1,12 @@ +2012-09-22 Chong Yidong + + * repeat.el (repeat): Doc fix (Bug#12348). + + * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix + (Bug#10909). + + * simple.el (shell-command-on-region): Doc fix. + 2012-09-22 Eli Zaretskii * emacs-lisp/timer.el (run-with-idle-timer) === modified file 'lisp/emacs-lisp/easy-mmode.el' --- lisp/emacs-lisp/easy-mmode.el 2012-06-27 14:05:24 +0000 +++ lisp/emacs-lisp/easy-mmode.el 2012-09-22 15:24:26 +0000 @@ -90,12 +90,17 @@ DOC is the documentation for the mode toggle command. The defined mode command takes one optional (prefix) argument. -Interactively with no prefix argument it toggles the mode. -With a prefix argument, it enables the mode if the argument is -positive and otherwise disables it. When called from Lisp, it -enables the mode if the argument is omitted or nil, and toggles -the mode if the argument is `toggle'. If DOC is nil this -function adds a basic doc-string stating these facts. +Interactively with no prefix argument, it toggles the mode. +A prefix argument enables the mode if the argument is positive, +and disables it otherwise. + +When called from Lisp, the mode command toggles the mode if the +argument is `toggle', disables the mode if the argument is a +non-positive integer, and enables the mode otherwise (including +if the argument is omitted or nil or a positive integer). + +If DOC is nil, give the mode command a basic doc-string +documenting what its argument does. Optional INIT-VALUE is the initial value of the mode's variable. Optional LIGHTER is displayed in the mode line when the mode is on. === modified file 'lisp/repeat.el' --- lisp/repeat.el 2012-05-05 02:50:20 +0000 +++ lisp/repeat.el 2012-09-22 15:24:26 +0000 @@ -193,9 +193,9 @@ ;;;###autoload (defun repeat (repeat-arg) "Repeat most recently executed command. -With prefix arg, apply new prefix arg to that command; otherwise, -use the prefix arg that was used before (if any). -This command is like the `.' command in the vi editor. +If REPEAT-ARG is non-nil (interactively, with a prefix argument), +supply a prefix argument to that command. Otherwise, give the +command the same prefix argument it was given before, if any. If this command is invoked by a multi-character key sequence, it can then be repeated by repeating the final character of that === modified file 'lisp/simple.el' --- lisp/simple.el 2012-09-22 03:07:39 +0000 +++ lisp/simple.el 2012-09-22 15:24:26 +0000 @@ -2604,8 +2604,6 @@ falling back to `default-process-coding-system' if no match for COMMAND is found in `process-coding-system-alist'. -The noninteractive arguments are START, END, COMMAND, -OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. Noninteractive callers can specify coding systems by binding `coding-system-for-read' and `coding-system-for-write'. @@ -2613,34 +2611,34 @@ in the echo area or in a buffer. If the output is short enough to display in the echo area \(determined by the variable `max-mini-window-height' if -`resize-mini-windows' is non-nil), it is shown there. Otherwise -it is displayed in the buffer `*Shell Command Output*'. The output -is available in that buffer in both cases. +`resize-mini-windows' is non-nil), it is shown there. +Otherwise it is displayed in the buffer `*Shell Command Output*'. +The output is available in that buffer in both cases. If there is output and an error, a message about the error -appears at the end of the output. - -If there is no output, or if output is inserted in the current buffer, -then `*Shell Command Output*' is deleted. - -If the optional fourth argument OUTPUT-BUFFER is non-nil, -that says to put the output in some other buffer. -If OUTPUT-BUFFER is a buffer or buffer name, put the output there. -If OUTPUT-BUFFER is not a buffer and not nil, -insert output in the current buffer. -In either case, the output is inserted after point (leaving mark after it). - -If REPLACE, the optional fifth argument, is non-nil, that means insert -the output in place of text from START to END, putting point and mark +appears at the end of the output. If there is no output, or if +output is inserted in the current buffer, the buffer `*Shell +Command Output*' is deleted. + +Optional fourth arg OUTPUT-BUFFER specifies where to put the +command's output. If the value is a buffer or buffer name, put +the output there. Any other value, including nil, means to +insert the output in the current buffer. In either case, the +output is inserted after point (leaving mark after it). + +Optional fifth arg REPLACE, if non-nil, means to insert the +output in place of text from START to END, putting point and mark around it. -If optional sixth argument ERROR-BUFFER is non-nil, it is a buffer -or buffer name to which to direct the command's standard error output. -If it is nil, error output is mingled with regular output. -If DISPLAY-ERROR-BUFFER is non-nil, display the error buffer if there -were any errors. (This is always t, interactively.) -In an interactive call, the variable `shell-command-default-error-buffer' -specifies the value of ERROR-BUFFER." +Optional sixth arg ERROR-BUFFER, if non-nil, specifies a buffer +or buffer name to which to direct the command's standard error +output. If nil, error output is mingled with regular output. +When called interactively, `shell-command-default-error-buffer' +is used for ERROR-BUFFER. + +Optional seventh arg DISPLAY-ERROR-BUFFER, if non-nil, means to +display the error buffer if there were any errors. When called +interactively, this is t." (interactive (let (string) (unless (mark) (error "The mark is not set now, so there is no region")) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-22 14:10:24 +0000 +++ src/ChangeLog 2012-09-22 15:24:26 +0000 @@ -1,5 +1,16 @@ 2012-09-22 Chong Yidong + * search.c (Freplace_match): Doc fix (Bug#12325). + + * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391). + + * editfns.c (Fline_beginning_position): Doc fix (Bug#12416). + (Fline_end_position): Doc fix. + + * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414). + +2012-09-22 Chong Yidong + * dispextern.h (struct image_type): Add new slot, storing a type initialization function. === modified file 'src/cmds.c' --- src/cmds.c 2012-09-15 07:06:56 +0000 +++ src/cmds.c 2012-09-22 15:24:26 +0000 @@ -85,6 +85,7 @@ DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", doc: /* Move point N characters forward (backward if N is negative). On reaching end or beginning of buffer, stop and signal error. +Interactively, N is the numeric prefix argument. Depending on the bidirectional context, the movement may be to the right or to the left on the screen. This is in contrast with @@ -97,6 +98,7 @@ DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p", doc: /* Move point N characters backward (forward if N is negative). On attempt to pass beginning or end of buffer, stop and signal error. +Interactively, N is the numeric prefix argument. Depending on the bidirectional context, the movement may be to the right or to the left on the screen. This is in contrast with === modified file 'src/editfns.c' --- src/editfns.c 2012-09-15 07:06:56 +0000 +++ src/editfns.c 2012-09-22 15:24:26 +0000 @@ -738,17 +738,18 @@ DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, 0, 1, 0, doc: /* Return the character position of the first character on the current line. -With argument N not nil or 1, move forward N - 1 lines first. -If scan reaches end of buffer, return that position. +With optional argument N, scan forward N - 1 lines first. +If the scan reaches the end of the buffer, return that position. -The returned position is of the first character in the logical order, -i.e. the one that has the smallest character position. +This function ignores text display directionality; it returns the +position of the first character in logical order, i.e. the smallest +character position on the line. This function constrains the returned position to the current field -unless that would be on a different line than the original, +unless that position would be on a different line than the original, unconstrained result. If N is nil or 1, and a front-sticky field starts at point, the scan stops as soon as it starts. To ignore field -boundaries bind `inhibit-field-text-motion' to t. +boundaries, bind `inhibit-field-text-motion' to t. This function does not move point. */) (Lisp_Object n) @@ -782,8 +783,9 @@ With argument N not nil or 1, move forward N - 1 lines first. If scan reaches end of buffer, return that position. -The returned position is of the last character in the logical order, -i.e. the character whose buffer position is the largest one. +This function ignores text display directionality; it returns the +position of the last character in logical order, i.e. the largest +character position on the line. This function constrains the returned position to the current field unless that would be on a different line than the original, === modified file 'src/minibuf.c' --- src/minibuf.c 2012-09-15 07:06:56 +0000 +++ src/minibuf.c 2012-09-22 15:24:26 +0000 @@ -1862,11 +1862,11 @@ DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, doc: /* Perform completion on buffer names. -If the argument FLAG is nil, invoke `try-completion', if it's t, invoke -`all-completions', otherwise invoke `test-completion'. +STRING and PREDICATE have the same meanings as in `try-completion', +`all-completions', and `test-completion'. -The arguments STRING and PREDICATE are as in `try-completion', -`all-completions', and `test-completion'. */) +If FLAG is nil, invoke `try-completion'; if it is t, invoke +`all-completions'; otherwise invoke `test-completion'. */) (Lisp_Object string, Lisp_Object predicate, Lisp_Object flag) { if (NILP (flag)) === modified file 'src/search.c' --- src/search.c 2012-09-17 20:11:34 +0000 +++ src/search.c 2012-09-22 15:24:26 +0000 @@ -2220,15 +2220,14 @@ doc: /* Replace text matched by last search with NEWTEXT. Leave point at the end of the replacement text. -If second arg FIXEDCASE is non-nil, do not alter case of replacement text. -Otherwise maybe capitalize the whole text, or maybe just word initials, -based on the replaced text. -If the replaced text has only capital letters -and has at least one multiletter word, convert NEWTEXT to all caps. -Otherwise if all words are capitalized in the replaced text, -capitalize each word in NEWTEXT. +If optional second arg FIXEDCASE is non-nil, do not alter the case of +the replacement text. Otherwise, maybe capitalize the whole text, or +maybe just word initials, based on the replaced text. If the replaced +text has only capital letters and has at least one multiletter word, +convert NEWTEXT to all caps. Otherwise if all words are capitalized +in the replaced text, capitalize each word in NEWTEXT. -If third arg LITERAL is non-nil, insert NEWTEXT literally. +If optional third arg LITERAL is non-nil, insert NEWTEXT literally. Otherwise treat `\\' as special: `\\&' in NEWTEXT means substitute original matched text. `\\N' means substitute what matched the Nth `\\(...\\)'. @@ -2239,13 +2238,11 @@ Any other character following `\\' signals an error. Case conversion does not apply to these substitutions. -FIXEDCASE and LITERAL are optional arguments. - -The optional fourth argument STRING can be a string to modify. -This is meaningful when the previous match was done against STRING, -using `string-match'. When used this way, `replace-match' -creates and returns a new string made by copying STRING and replacing -the part of STRING that was matched. +If optional fourth argument STRING is non-nil, it should be a string +to act on; this should be the string on which the previous match was +done via `string-match'. In this case, `replace-match' creates and +returns a new string, made by copying STRING and replacing the part of +STRING that was matched (the original STRING itself is not altered). The optional fifth argument SUBEXP specifies a subexpression; it says to replace just that subexpression with NEWTEXT, ------------------------------------------------------------ revno: 110140 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-09-22 22:10:24 +0800 message: Refactor image-type loading. * src/dispextern.h (struct image_type): Add new slot, storing a type initialization function. * src/image.c (define_image_type): Call the image initializer function if it is defined. Arguments and return value changed. (valid_image_p, make_image): Callers changed. (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type) (gif_type, imagemagick_type, svg_type, gs_type): Add initialization functions. (Finit_image_library): Call lookup_image_type. (CHECK_LIB_AVAILABLE): Macro deleted. (lookup_image_type): Call define_image_type here, rather than via Finit_image_library, and without using CHECK_LIB_AVAILABLE. (syms_of_image): Move define_image_type calls for xbm_type and pbm_type to lookup_image_type. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-22 13:16:03 +0000 +++ src/ChangeLog 2012-09-22 14:10:24 +0000 @@ -1,3 +1,21 @@ +2012-09-22 Chong Yidong + + * dispextern.h (struct image_type): Add new slot, storing a type + initialization function. + + * image.c (define_image_type): Call the image initializer function + if it is defined. Arguments and return value changed. + (valid_image_p, make_image): Callers changed. + (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type) + (gif_type, imagemagick_type, svg_type, gs_type): Add + initialization functions. + (Finit_image_library): Call lookup_image_type. + (CHECK_LIB_AVAILABLE): Macro deleted. + (lookup_image_type): Call define_image_type here, rather than via + Finit_image_library, and without using CHECK_LIB_AVAILABLE. + (syms_of_image): Move define_image_type calls for xbm_type and + pbm_type to lookup_image_type. + 2012-09-22 Eli Zaretskii * keyboard.c (timer_check_2): Move calculation of 'timers' and === modified file 'src/dispextern.h' --- src/dispextern.h 2012-09-22 12:49:25 +0000 +++ src/dispextern.h 2012-09-22 14:10:24 +0000 @@ -2767,6 +2767,10 @@ /* Free resources of image IMG which is used on frame F. */ void (* free) (struct frame *f, struct image *img); + /* Initialization function (used for dynamic loading of image + libraries on Windows), or NULL if none. */ + int (* init) (Lisp_Object); + /* Next in list of all supported image types. */ struct image_type *next; }; === modified file 'src/image.c' --- src/image.c 2012-09-21 03:52:23 +0000 +++ src/image.c 2012-09-22 14:10:24 +0000 @@ -561,8 +561,8 @@ /* Function prototypes. */ -static Lisp_Object define_image_type (struct image_type *type, int loaded); -static struct image_type *lookup_image_type (Lisp_Object symbol); +static struct image_type *define_image_type (struct image_type *, Lisp_Object); +static struct image_type *lookup_image_type (Lisp_Object, Lisp_Object); static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); @@ -579,54 +579,54 @@ do { Vimage_types = Fcons (type, Vimage_types); } while (0) /* Define a new image type from TYPE. This adds a copy of TYPE to - image_types and caches the loading status of TYPE. */ - -static Lisp_Object -define_image_type (struct image_type *type, int loaded) + image_types and caches the loading status of TYPE. + + LIBRARIES is an alist associating dynamic libraries to external + files implementing them, which is passed to the image library + initialization function if necessary. A nil value defaults to + Vdynamic_library_alist. */ + +static struct image_type * +define_image_type (struct image_type *type, Lisp_Object libraries) { - Lisp_Object success; - - if (!loaded) - success = Qnil; - else - { - struct image_type *p; - Lisp_Object target_type = *(type->type); - for (p = image_types; p; p = p->next) - if (EQ (*(p->type), target_type)) - return Qt; - + struct image_type *p = NULL; + Lisp_Object target_type = *type->type; + int type_valid = 1; + + BLOCK_INPUT; + + for (p = image_types; p; p = p->next) + if (EQ (*p->type, target_type)) + goto done; + + if (type->init) + { +#ifdef HAVE_NTGUI + /* If we failed to load the library before, don't try again. */ + Lisp_Object tested = Fassq (target_type, Vlibrary_cache); + if (CONSP (tested) && NILP (XCDR (tested))) + type_valid = 0; + else +#endif + { + type_valid = type->init (libraries); + CACHE_IMAGE_TYPE (target_type, type_valid ? Qt : Qnil); + } + } + + if (type_valid) + { /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ p = xmalloc (sizeof *p); *p = *type; p->next = image_types; image_types = p; - success = Qt; } - CACHE_IMAGE_TYPE (*type->type, success); - return success; -} - - -/* Look up image type SYMBOL, and return a pointer to its image_type - structure. Value is null if SYMBOL is not a known image type. */ - -static inline struct image_type * -lookup_image_type (Lisp_Object symbol) -{ - struct image_type *type; - - /* We must initialize the image-type if it hasn't been already. */ - if (NILP (Finit_image_library (symbol, Vdynamic_library_alist))) - return 0; /* unimplemented */ - - for (type = image_types; type; type = type->next) - if (EQ (symbol, *type->type)) - break; - - return type; + done: + UNBLOCK_INPUT; + return p; } @@ -653,7 +653,7 @@ if (CONSP (tem) && SYMBOLP (XCAR (tem))) { struct image_type *type; - type = lookup_image_type (XCAR (tem)); + type = lookup_image_type (XCAR (tem), Qnil); if (type) valid_p = type->valid_p (object); } @@ -986,7 +986,7 @@ eassert (valid_image_p (spec)); img->dependencies = NILP (file) ? Qnil : list1 (file); - img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); + img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL), Qnil); eassert (img->type != NULL); img->spec = spec; img->lisp_data = Qnil; @@ -2262,6 +2262,7 @@ xbm_image_p, xbm_load, x_clear_image, + NULL, NULL }; @@ -3051,6 +3052,12 @@ {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; +#ifdef HAVE_NTGUI +static int init_xpm_functions (Lisp_Object); +#else +#define init_xpm_functions NULL +#endif + /* Structure describing the image type XPM. */ static struct image_type xpm_type = @@ -3059,6 +3066,7 @@ xpm_image_p, xpm_load, x_clear_image, + init_xpm_functions, NULL }; @@ -4981,6 +4989,7 @@ pbm_image_p, pbm_load, x_clear_image, + NULL, NULL }; @@ -5387,6 +5396,12 @@ {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; +#ifdef HAVE_NTGUI +static int init_png_functions (Lisp_Object); +#else +#define init_png_functions NULL +#endif + /* Structure describing the image type `png'. */ static struct image_type png_type = @@ -5395,6 +5410,7 @@ png_image_p, png_load, x_clear_image, + init_png_functions, NULL }; @@ -6039,6 +6055,12 @@ {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; +#ifdef HAVE_NTGUI +static int init_jpeg_functions (Lisp_Object); +#else +#define init_jpeg_functions NULL +#endif + /* Structure describing the image type `jpeg'. */ static struct image_type jpeg_type = @@ -6047,6 +6069,7 @@ jpeg_image_p, jpeg_load, x_clear_image, + init_jpeg_functions, NULL }; @@ -6624,6 +6647,12 @@ {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} }; +#ifdef HAVE_NTGUI +static int init_tiff_functions (Lisp_Object); +#else +#define init_tiff_functions NULL +#endif + /* Structure describing the image type `tiff'. */ static struct image_type tiff_type = @@ -6632,6 +6661,7 @@ tiff_image_p, tiff_load, x_clear_image, + init_tiff_functions, NULL }; @@ -7072,6 +7102,12 @@ {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; +#ifdef HAVE_NTGUI +static int init_gif_functions (Lisp_Object); +#else +#define init_gif_functions NULL +#endif + /* Structure describing the image type `gif'. */ static struct image_type gif_type = @@ -7080,6 +7116,7 @@ gif_image_p, gif_load, gif_clear_image, + init_gif_functions, NULL }; @@ -7562,6 +7599,12 @@ {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} }; +#ifdef HAVE_NTGUI +static int init_imagemagick_functions (Lisp_Object); +#else +#define init_imagemagick_functions NULL +#endif + /* Structure describing the image type for any image handled via ImageMagick. */ @@ -7571,6 +7614,7 @@ imagemagick_image_p, imagemagick_load, imagemagick_clear_image, + init_imagemagick_functions, NULL }; @@ -8109,22 +8153,23 @@ {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; +#ifdef HAVE_NTGUI +static int init_svg_functions (Lisp_Object); +#else +#define init_svg_functions NULL +#endif + /* Structure describing the image type `svg'. Its the same type of structure defined for all image formats, handled by emacs image functions. See struct image_type in dispextern.h. */ static struct image_type svg_type = { - /* An identifier showing that this is an image structure for the SVG format. */ &Qsvg, - /* Handle to a function that can be used to identify a SVG file. */ svg_image_p, - /* Handle to function used to load a SVG file. */ svg_load, - /* Handle to function to free sresources for SVG. */ x_clear_image, - /* An internal field to link to the next image type in a list of - image types, will be filled in when registering the format. */ + init_svg_functions, NULL }; @@ -8504,6 +8549,12 @@ {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; +#ifdef HAVE_NTGUI +static int init_gs_functions (Lisp_Object); +#else +#define init_gs_functions NULL +#endif + /* Structure describing the image type `ghostscript'. */ static struct image_type gs_type = @@ -8512,6 +8563,7 @@ gs_image_p, gs_load, gs_clear_image, + init_gs_functions, NULL }; @@ -8774,16 +8826,6 @@ Initialization ***********************************************************************/ -#ifdef HAVE_NTGUI -/* Image types that rely on external libraries are loaded dynamically - if the library is available. */ -#define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, init_lib_fn (libraries)) -#else -#define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, 1) -#endif /* HAVE_NTGUI */ - DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0, doc: /* Initialize image library implementing image type TYPE. Return non-nil if TYPE is a supported image type. @@ -8793,61 +8835,71 @@ of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { -#ifdef HAVE_NTGUI - /* Don't try to reload the library. */ - Lisp_Object tested = Fassq (type, Vlibrary_cache); - if (CONSP (tested)) - return XCDR (tested); -#endif + return lookup_image_type (type, libraries) ? Qt : Qnil; +} + +/* Look up image type TYPE, and return a pointer to its image_type + structure. Return 0 if TYPE is not a known image type. + + LIBRARIES is an alist associating dynamic libraries to external + files implementing them, which is passed to the image library + initialization function if necessary. A nil value defaults to + Vdynamic_library_alist. */ + +static struct image_type * +lookup_image_type (Lisp_Object type, Lisp_Object libraries) +{ + if (NILP (libraries)) + libraries = Vdynamic_library_alist; /* Types pbm and xbm are built-in and always available. */ - if (EQ (type, Qpbm) || EQ (type, Qxbm)) - return Qt; + if (EQ (type, Qpbm)) + return define_image_type (&pbm_type, libraries); + + if (EQ (type, Qxbm)) + return define_image_type (&xbm_type, libraries); #if defined (HAVE_XPM) || defined (HAVE_NS) if (EQ (type, Qxpm)) - return CHECK_LIB_AVAILABLE (&xpm_type, init_xpm_functions, libraries); + return define_image_type (&xpm_type, libraries); #endif #if defined (HAVE_JPEG) || defined (HAVE_NS) if (EQ (type, Qjpeg)) - return CHECK_LIB_AVAILABLE (&jpeg_type, init_jpeg_functions, libraries); + return define_image_type (&jpeg_type, libraries); #endif #if defined (HAVE_TIFF) || defined (HAVE_NS) if (EQ (type, Qtiff)) - return CHECK_LIB_AVAILABLE (&tiff_type, init_tiff_functions, libraries); + return define_image_type (&tiff_type, libraries); #endif #if defined (HAVE_GIF) || defined (HAVE_NS) if (EQ (type, Qgif)) - return CHECK_LIB_AVAILABLE (&gif_type, init_gif_functions, libraries); + return define_image_type (&gif_type, libraries); #endif #if defined (HAVE_PNG) || defined (HAVE_NS) if (EQ (type, Qpng)) - return CHECK_LIB_AVAILABLE (&png_type, init_png_functions, libraries); + return define_image_type (&png_type, libraries); #endif #if defined (HAVE_RSVG) if (EQ (type, Qsvg)) - return CHECK_LIB_AVAILABLE (&svg_type, init_svg_functions, libraries); + return define_image_type (&svg_type, libraries); #endif #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) - return CHECK_LIB_AVAILABLE (&imagemagick_type, init_imagemagick_functions, - libraries); + return define_image_type (&imagemagick_type, libraries); #endif #ifdef HAVE_GHOSTSCRIPT if (EQ (type, Qpostscript)) - return CHECK_LIB_AVAILABLE (&gs_type, init_gs_functions, libraries); + return define_image_type (&gs_type, libraries); #endif - /* If the type is not recognized, avoid testing it ever again. */ - CACHE_IMAGE_TYPE (type, Qnil); - return Qnil; + return NULL; } void @@ -8878,15 +8930,6 @@ non-numeric, there is no explicit limit on the size of images. */); Vmax_image_size = make_float (MAX_IMAGE_SIZE); - DEFSYM (Qpbm, "pbm"); - ADD_IMAGE_TYPE (Qpbm); - - DEFSYM (Qxbm, "xbm"); - ADD_IMAGE_TYPE (Qxbm); - - define_image_type (&xbm_type, 1); - define_image_type (&pbm_type, 1); - DEFSYM (Qcount, "count"); DEFSYM (Qextension_data, "extension-data"); DEFSYM (Qdelay, "delay"); @@ -8930,6 +8973,12 @@ ); #endif + DEFSYM (Qpbm, "pbm"); + ADD_IMAGE_TYPE (Qpbm); + + DEFSYM (Qxbm, "xbm"); + ADD_IMAGE_TYPE (Qxbm); + #if defined (HAVE_XPM) || defined (HAVE_NS) DEFSYM (Qxpm, "xpm"); ADD_IMAGE_TYPE (Qxpm); ------------------------------------------------------------ revno: 110139 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-09-22 16:24:58 +0300 message: edebug.texi (Instrumenting): Improve indexing. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-09-22 13:16:03 +0000 +++ doc/lispref/ChangeLog 2012-09-22 13:24:58 +0000 @@ -1,5 +1,7 @@ 2012-09-22 Eli Zaretskii + * edebug.texi (Instrumenting): Improve indexing. + * os.texi (Idle Timers): Warn against reinvoking an idle timer from within its own timer action. (Bug#12447) === modified file 'doc/lispref/edebug.texi' --- doc/lispref/edebug.texi 2012-06-17 05:13:40 +0000 +++ doc/lispref/edebug.texi 2012-09-22 13:24:58 +0000 @@ -150,6 +150,7 @@ @node Instrumenting @subsection Instrumenting for Edebug +@cindex instrumenting for Edebug In order to use Edebug to debug Lisp code, you must first @dfn{instrument} the code. Instrumenting code inserts additional code @@ -179,9 +180,11 @@ edebug-all-forms} toggles this option. @findex edebug-eval-top-level-form +@findex edebug-defun Another command, @kbd{M-x edebug-eval-top-level-form}, is available to instrument any top-level form regardless of the values of @code{edebug-all-defs} and @code{edebug-all-forms}. +@code{edebug-defun} is an alias for @code{edebug-eval-top-level-form}. While Edebug is active, the command @kbd{I} (@code{edebug-instrument-callee}) instruments the definition of the ------------------------------------------------------------ revno: 110138 fixes bugs: http://debbugs.gnu.org/12447 http://debbugs.gnu.org/12326 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-09-22 16:16:03 +0300 message: Fix bugs #12447 and #12326 with infloop causes by idle timers, update docs. src/keyboard.c (timer_check_2): Move calculation of 'timers' and 'idle_timers' from here ... (timer_check): ... to here. Use Fcopy_sequence to copy the timer lists, to avoid infloops when the timer does something stupid, like reinvoke itself with the same or smaller time-out. lisp/emacs-lisp/timer.el (run-with-idle-timer) (timer-activate-when-idle): Warn against reinvoking an idle timer from within its own timer action. doc/lispref/os.texi (Idle Timers): Warn against reinvoking an idle timer from within its own timer action. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-09-22 03:29:37 +0000 +++ doc/lispref/ChangeLog 2012-09-22 13:16:03 +0000 @@ -1,3 +1,8 @@ +2012-09-22 Eli Zaretskii + + * os.texi (Idle Timers): Warn against reinvoking an idle timer + from within its own timer action. (Bug#12447) + 2012-09-22 Chong Yidong * frames.texi (Pop-Up Menus): Minor clarification (Bug#11148). === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2012-06-22 21:17:42 +0000 +++ doc/lispref/os.texi 2012-09-22 13:16:03 +0000 @@ -1864,6 +1864,13 @@ @end itemize @noindent +For similar reasons, do not write an idle timer function that sets +up another idle time (including the same idle timer) with the +@var{secs} argument less or equal to the current idleness time. Such +a timer will run almost immediately, and continue running again and +again, instead of waiting for the next time Emacs becomes idle. + +@noindent The correct approach is for the idle timer to reschedule itself after a brief pause, using the method in the @code{timer-function} example above. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 12:56:08 +0000 +++ lisp/ChangeLog 2012-09-22 13:16:03 +0000 @@ -1,3 +1,9 @@ +2012-09-22 Eli Zaretskii + + * emacs-lisp/timer.el (run-with-idle-timer) + (timer-activate-when-idle): Warn against reinvoking an idle timer + from within its own timer action. (Bug#12447) + 2012-09-22 Martin Rudalics * cus-start.el (window-combination-limit): Add new optional === modified file 'lisp/emacs-lisp/timer.el' --- lisp/emacs-lisp/timer.el 2012-09-13 16:23:06 +0000 +++ lisp/emacs-lisp/timer.el 2012-09-22 13:16:03 +0000 @@ -205,12 +205,19 @@ "Insert TIMER into `timer-idle-list'. This arranges to activate TIMER whenever Emacs is next idle. If optional argument DONT-WAIT is non-nil, set TIMER to activate -immediately, or at the right time, if Emacs is already idle. +immediately \(see beloe\), or at the right time, if Emacs is +already idle. REUSE-CELL, if non-nil, is a cons cell to reuse when inserting TIMER into `timer-idle-list' (usually a cell removed from that list by `cancel-timer-internal'; using this reduces consing for -repeat timers). If nil, allocate a new cell." +repeat timers). If nil, allocate a new cell. + +Using non-nil DONT-WAIT is not recommended when activating an +idle timer from an idle timer handler, if the timer being +activated has an idleness time that is smaller or equal to +the time of the current timer. That's because the activated +timer will fire right away." (timer--activate timer (not dont-wait) reuse-cell 'idle)) (defalias 'disable-timeout 'cancel-timer) @@ -403,7 +410,9 @@ SECS may be an integer, a floating point number, or the internal time format returned by, e.g., `current-idle-time'. If Emacs is currently idle, and has been idle for N seconds (N < SECS), -then it will call FUNCTION in SECS - N seconds from now. +then it will call FUNCTION in SECS - N seconds from now. Using +SECS <= N is not recommended if this function is invoked from an idle +timer, because FUNCTION will then be called immediately. If REPEAT is non-nil, do the action each time Emacs has been idle for exactly SECS seconds (that is, only once for each time Emacs becomes idle). === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-22 12:56:08 +0000 +++ src/ChangeLog 2012-09-22 13:16:03 +0000 @@ -1,3 +1,12 @@ +2012-09-22 Eli Zaretskii + + * keyboard.c (timer_check_2): Move calculation of 'timers' and + 'idle_timers' from here ... + (timer_check): ... to here. Use Fcopy_sequence to copy the timer + lists, to avoid infloops when the timer does something stupid, + like reinvoke itself with the same or smaller time-out. + (Bug#12447) + 2012-09-22 Martin Rudalics * window.c (Fsplit_window_internal): Handle only Qt value of === modified file 'src/keyboard.c' --- src/keyboard.c 2012-09-20 01:37:07 +0000 +++ src/keyboard.c 2012-09-22 13:16:03 +0000 @@ -4333,25 +4333,18 @@ should be done. */ static EMACS_TIME -timer_check_2 (void) +timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers) { EMACS_TIME nexttime; EMACS_TIME now; EMACS_TIME idleness_now; - Lisp_Object timers, idle_timers, chosen_timer; - struct gcpro gcpro1, gcpro2, gcpro3; + Lisp_Object chosen_timer; + struct gcpro gcpro1; nexttime = invalid_emacs_time (); - /* Always consider the ordinary timers. */ - timers = Vtimer_list; - /* Consider the idle timers only if Emacs is idle. */ - if (EMACS_TIME_VALID_P (timer_idleness_start_time)) - idle_timers = Vtimer_idle_list; - else - idle_timers = Qnil; chosen_timer = Qnil; - GCPRO3 (timers, idle_timers, chosen_timer); + GCPRO1 (chosen_timer); /* First run the code that was delayed. */ while (CONSP (pending_funcalls)) @@ -4500,13 +4493,30 @@ timer_check (void) { EMACS_TIME nexttime; + Lisp_Object timers, idle_timers; + struct gcpro gcpro1, gcpro2; + + /* We use copies of the timers' lists to allow a timer to add itself + again, without locking up Emacs if the newly added timer is + already ripe when added. */ + + /* Always consider the ordinary timers. */ + timers = Fcopy_sequence (Vtimer_list); + /* Consider the idle timers only if Emacs is idle. */ + if (EMACS_TIME_VALID_P (timer_idleness_start_time)) + idle_timers = Fcopy_sequence (Vtimer_idle_list); + else + idle_timers = Qnil; + + GCPRO2 (timers, idle_timers); do { - nexttime = timer_check_2 (); + nexttime = timer_check_2 (timers, idle_timers); } while (EMACS_SECS (nexttime) == 0 && EMACS_NSECS (nexttime) == 0); + UNGCPRO; return nexttime; } ------------------------------------------------------------ revno: 110137 committer: martin rudalics branch nick: trunk timestamp: Sat 2012-09-22 14:56:08 +0200 message: Make Temp Buffer Resize Mode less intrusive (Bug#1806). * window.c (Fsplit_window_internal): Handle only Qt value of Vwindow_combination_limit separately. (Qtemp_buffer_resize): New symbol. (Vwindow_combination_limit): New default value. Rewrite doc-string. * cus-start.el (window-combination-limit): Add new optional values. * window.el (temp-buffer-window-show) (window--try-to-split-window): Obey new values of window-combination-limit. (split-window): Test window-combination-limit for t instead of non-nil. (display-buffer-at-bottom): New buffer display action function. * help.el (temp-buffer-resize-regexps): New option. (temp-buffer-resize-mode): Rewrite doc-string. (resize-temp-buffer-window): Obey temp-buffer-resize-regexps. Don't resize reused window. Suggested by Glen Morris. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-09-20 21:57:13 +0000 +++ etc/NEWS 2012-09-22 12:56:08 +0000 @@ -719,15 +719,21 @@ *** The functions get-lru-window, get-mru-window and get-largest-window now accept a third argument to avoid choosing the selected window. +*** Additional values recognized for option `window-combination-limit'. + *** New macro `with-temp-buffer-window'. -*** New option `temp-buffer-resize-frames'. +*** New options `temp-buffer-resize-frames' and +`temp-buffer-resize-regexps'. + +*** `temp-buffer-resize-mode' no longer resizes windows that have been +reused. *** New function `fit-frame-to-buffer' and new option - `fit-frame-to-buffer-bottom-margin'. +`fit-frame-to-buffer-bottom-margin'. -*** New display action functions `display-buffer-below-selected' and -`display-buffer-in-previous-window'. +*** New display action functions `display-buffer-below-selected', +`display-buffer-at-bottom' and `display-buffer-in-previous-window'. *** New display action alist entry `inhibit-switch-frame', if non-nil, tells display action functions to avoid changing which frame is === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 09:16:00 +0000 +++ lisp/ChangeLog 2012-09-22 12:56:08 +0000 @@ -1,3 +1,18 @@ +2012-09-22 Martin Rudalics + + * cus-start.el (window-combination-limit): Add new optional + values. + * window.el (temp-buffer-window-show) + (window--try-to-split-window): Handle new values of + window-combination-limit (Bug#1806). + (split-window): Test window-combination-limit for t instead of + non-nil. + (display-buffer-at-bottom): New buffer display action function. + * help.el (temp-buffer-resize-regexps): New option. + (temp-buffer-resize-mode): Rewrite doc-string. + (resize-temp-buffer-window): Obey temp-buffer-resize-regexps. + Don't resize reused window. Suggested by Glen Morris. + 2012-09-22 Stefan Merten * rst.el: Revamp section title faces. === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2012-08-15 16:29:11 +0000 +++ lisp/cus-start.el 2012-09-22 12:56:08 +0000 @@ -422,7 +422,17 @@ (const :tag "Only on ttys" :value tty) (other :tag "Always" t)) "23.1") (window-combination-resize windows boolean "24.1") - (window-combination-limit windows boolean "24.1") + (window-combination-limit + windows (choice + (const :tag "Never (nil)" :value nil) + (const :tag "For Temp Buffer Resize mode (temp-buffer-resize)" + :value temp-buffer-resize) + (const :tag "For temporary buffers (temp-buffer)" + :value temp-buffer) + (const :tag "For buffer display (display-buffer)" + :value display-buffer) + (other :tag "Always (t)" :value t)) + "24.3") ;; xdisp.c (show-trailing-whitespace whitespace-faces boolean nil :safe booleanp) === modified file 'lisp/help.el' --- lisp/help.el 2012-09-07 05:00:32 +0000 +++ lisp/help.el 2012-09-22 12:56:08 +0000 @@ -990,6 +990,17 @@ :version "24.2" :group 'help) +(defcustom temp-buffer-resize-regexps nil + "List of regexps that inhibit Temp Buffer Resize mode. +Any window of a buffer whose name matches one of these regular +expressions is left alone by Temp Buffer Resize mode." + :type '(repeat + :tag "Buffer" + :value "" + (regexp :format "%v")) + :version "24.3" + :group 'help) + (define-minor-mode temp-buffer-resize-mode "Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode). With a prefix argument ARG, enable Temp Buffer Resize mode if ARG @@ -1001,6 +1012,12 @@ fit the buffer's contents, but never more than `temp-buffer-max-height' nor less than `window-min-height'. +A window is resized only if it has been specially created for the +buffer. Windows that have shown another buffer before are not +resized. A window showing a buffer whose name matches any of the +expressions in `temp-buffer-resize-regexps' is not resized. A +frame is resized only if `temp-buffer-resize-frames' is non-nil. + This mode is used by `help', `apropos' and `completion' buffers, and some others." :global t :group 'help @@ -1017,27 +1034,33 @@ Do not make WINDOW higher than `temp-buffer-max-height' nor smaller than `window-min-height'. Do nothing if WINDOW is not vertically combined or some of its contents are scrolled out of -view." +view. Do nothing if the name of WINDOW's buffer matches an +expression in `temp-buffer-resize-regexps'." (setq window (window-normalize-window window t)) - (let ((height (if (functionp temp-buffer-max-height) - (with-selected-window window - (funcall temp-buffer-max-height (window-buffer))) - temp-buffer-max-height))) - (cond - ((and (pos-visible-in-window-p (point-min) window) - (window-combined-p window)) - (fit-window-to-buffer window height)) - ((and temp-buffer-resize-frames - (eq window (frame-root-window window)) - (memq (car (window-parameter window 'quit-restore)) - ;; If 'same is too strong, we might additionally check - ;; whether the second element is 'frame. - '(same frame))) - (let ((frame (window-frame window))) - (fit-frame-to-buffer - frame (+ (frame-height frame) - (- (window-total-size window)) - height))))))) + (let ((buffer-name (buffer-name (window-buffer window)))) + (unless (catch 'found + (dolist (regexp temp-buffer-resize-regexps) + (when (string-match regexp buffer-name) + (throw 'found t)))) + (let ((height (if (functionp temp-buffer-max-height) + (with-selected-window window + (funcall temp-buffer-max-height (window-buffer))) + temp-buffer-max-height)) + (quit-cadr (cadr (window-parameter window 'quit-restore)))) + (cond + ;; Don't resize WINDOW if it showed another buffer before. + ((and (eq quit-cadr 'window) + (pos-visible-in-window-p (point-min) window) + (window-combined-p window)) + (fit-window-to-buffer window height)) + ((and temp-buffer-resize-frames + (eq quit-cadr 'frame) + (eq window (frame-root-window window))) + (let ((frame (window-frame window))) + (fit-frame-to-buffer + frame (+ (frame-height frame) + (- (window-total-size window)) + height))))))))) ;;; Help windows. (defcustom help-window-select 'other === modified file 'lisp/window.el' --- lisp/window.el 2012-09-16 04:52:38 +0000 +++ lisp/window.el 2012-09-22 12:56:08 +0000 @@ -111,7 +111,19 @@ (set-buffer-modified-p nil) (setq buffer-read-only t) (goto-char (point-min)) - (when (setq window (display-buffer buffer action)) + (when (let ((window-combination-limit + ;; When `window-combination-limit' equals + ;; `temp-buffer' or `temp-buffer-resize' and + ;; `temp-buffer-resize-mode' is enabled in this + ;; buffer bind it to t so resizing steals space + ;; preferably from the window that was split. + (if (or (eq window-combination-limit 'temp-buffer) + (and (eq window-combination-limit + 'temp-buffer-resize) + temp-buffer-resize-mode)) + t + window-combination-limit))) + (setq window (display-buffer buffer action))) (setq frame (window-frame window)) (unless (eq frame (selected-frame)) (raise-frame frame)) @@ -3678,9 +3690,8 @@ (parent (window-parent window)) (function (window-parameter window 'split-window)) (window-side (window-parameter window 'window-side)) - ;; Rebind `window-combination-limit' and - ;; `window-combination-resize' since in some cases we may have - ;; to override their value. + ;; Rebind the following two variables since in some cases we + ;; have to override their value. (window-combination-limit window-combination-limit) (window-combination-resize window-combination-resize) atom-root) @@ -3738,7 +3749,7 @@ (and window-combination-resize (or (window-parameter window 'window-side) (not (eq window-combination-resize 'side))) - (not window-combination-limit) + (not (eq window-combination-limit t)) ;; Resize makes sense in iso-combinations only. (window-combined-p window horizontal))) ;; `old-size' is the current size of WINDOW. @@ -3818,7 +3829,7 @@ ;; Make new-parent non-nil if we need a new parent window; ;; either because we want to nest or because WINDOW is not ;; iso-combined. - (or window-combination-limit + (or (eq window-combination-limit t) (not (window-combined-p window horizontal)))) (setq new-normal ;; Make new-normal the normal size of the new window. @@ -5066,12 +5077,19 @@ represents a live window, nil otherwise." (and (window-live-p window) (not (frame-parameter (window-frame window) 'unsplittable)) - (let ((new-window - ;; Since `split-window-preferred-function' might - ;; throw an error use `condition-case'. - (condition-case nil - (funcall split-window-preferred-function window) - (error nil)))) + (let* ((window-combination-limit + ;; When `window-combination-limit' equals + ;; `display-buffer' bind it to t so resizing steals + ;; space preferably from the window that was split. + (if (eq window-combination-limit 'display-buffer) + t + window-combination-limit)) + (new-window + ;; Since `split-window-preferred-function' might + ;; throw an error use `condition-case'. + (condition-case nil + (funcall split-window-preferred-function window) + (error nil)))) (and (window-live-p new-window) new-window)))) (defun window--frame-usable-p (frame) @@ -5524,6 +5542,29 @@ (window--display-buffer buffer window 'reuse display-buffer-mark-dedicated))))) +(defun display-buffer-at-bottom (buffer _alist) + "Try displaying BUFFER in a window at the botom of the selected frame. +This either splits the window at the bottom of the frame or the +frame's root window, or reuses an existing window at the bottom +of the selected frame." + (let (bottom-window window) + (walk-window-tree (lambda (window) (setq bottom-window window))) + (or (and (not (frame-parameter nil 'unsplittable)) + (setq window (window--try-to-split-window bottom-window)) + (window--display-buffer + buffer window 'window display-buffer-mark-dedicated)) + (and (not (frame-parameter nil 'unsplittable)) + (setq window + (condition-case nil + (split-window (frame-root-window)) + (error nil))) + (window--display-buffer + buffer window 'window display-buffer-mark-dedicated)) + (and (setq window bottom-window) + (not (window-dedicated-p window)) + (window--display-buffer + buffer window 'reuse display-buffer-mark-dedicated))))) + (defun display-buffer-in-previous-window (buffer alist) "Display BUFFER in a window previously showing it. If ALIST has a non-nil `inhibit-same-window' entry, the selected === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-22 12:31:05 +0000 +++ src/ChangeLog 2012-09-22 12:56:08 +0000 @@ -1,3 +1,11 @@ +2012-09-22 Martin Rudalics + + * window.c (Fsplit_window_internal): Handle only Qt value of + Vwindow_combination_limit separately. + (Qtemp_buffer_resize): New symbol. + (Vwindow_combination_limit): New default value. Rewrite + doc-string. + 2012-09-22 Eli Zaretskii * xdisp.c (next_overlay_string): Initialize it->end_charpos for === modified file 'src/window.c' --- src/window.c 2012-09-20 03:10:52 +0000 +++ src/window.c 2012-09-22 12:56:08 +0000 @@ -60,8 +60,7 @@ static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window; static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; -static Lisp_Object Qsafe, Qabove, Qbelow; -static Lisp_Object Qclone_of; +static Lisp_Object Qsafe, Qabove, Qbelow, Qtemp_buffer_resize, Qclone_of; static int displayed_window_lines (struct window *); static int count_windows (struct window *); @@ -613,10 +612,10 @@ DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT. WINDOW must be a valid window and defaults to the selected one. -If LIMIT is nil, child windows of WINDOW can be recombined with -WINDOW's siblings. LIMIT t means that child windows of WINDOW are -never \(re-)combined with WINDOW's siblings. Other values are reserved -for future use. */) +If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's +siblings. LIMIT t means that child windows of WINDOW are never +\(re-)combined with WINDOW's siblings. Other values are reserved for +future use. */) (Lisp_Object window, Lisp_Object limit) { wset_combination_limit (decode_valid_window (window), limit); @@ -3466,7 +3465,7 @@ allocate_window. */ wset_prev_buffers (w, Qnil); wset_next_buffers (w, Qnil); - + /* Initialize non-Lisp data. Note that allocate_window zeroes out all non-Lisp data, so do it only for slots which should not be zero. */ w->nrows_scale_factor = w->ncols_scale_factor = 1; @@ -3848,7 +3847,7 @@ We do that if either `window-combination-limit' is t, or OLD has no parent, or OLD is ortho-combined. */ combination_limit = - !NILP (Vwindow_combination_limit) + EQ (Vwindow_combination_limit, Qt) || NILP (o->parent) || NILP (horflag ? (XWINDOW (o->parent)->hchild) @@ -3903,9 +3902,9 @@ make_parent_window (old, horflag); p = XWINDOW (o->parent); - /* Store value of `window-combination-limit' in new parent's - combination_limit slot. */ - wset_combination_limit (p, Vwindow_combination_limit); + /* Store t in the new parent's combination_limit slot to avoid + that its children get merged into another window. */ + wset_combination_limit (p, Qt); /* These get applied below. */ wset_new_total (p, horflag ? o->total_cols : o->total_lines); wset_new_normal (p, new_normal); @@ -6705,6 +6704,7 @@ DEFSYM (Qreplace_buffer_in_windows, "replace-buffer-in-windows"); DEFSYM (Qrecord_window_buffer, "record-window-buffer"); DEFSYM (Qget_mru_window, "get-mru-window"); + DEFSYM (Qtemp_buffer_resize, "temp-buffer-resize"); DEFSYM (Qtemp_buffer_show_hook, "temp-buffer-show-hook"); DEFSYM (Qabove, "above"); DEFSYM (Qbelow, "below"); @@ -6800,23 +6800,36 @@ Vwindow_combination_resize = Qnil; DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit, - doc: /* If t, splitting a window makes a new parent window. -If this variable is nil, splitting a window will create a new parent -window only if the window has no parent window or the window shall -become a combination orthogonal to the one it is part of. - -If this variable is t, splitting a window always creates a new parent -window. If all splits behave this way, each frame's window tree is a -binary tree and every window but the frame's root window has exactly one -sibling. - -Other values are reserved for future use. - -The value of this variable is also assigned to the combination limit of -the new parent window. The combination limit of a window can be -retrieved via the function `window-combination-limit' and altered by the -function `set-window-combination-limit'. */); - Vwindow_combination_limit = Qnil; + doc: /* If non-nil, splitting a window makes a new parent window. +The following values are recognized: + +nil means splitting a window will create a new parent window only if the + window has no parent window or the window shall become a combination + orthogonal to the one it is part of. + +`temp-buffer-resize' means that splitting a window for displaying a + temporary buffer makes a new parent window provided + `temp-buffer-resize-mode' is enabled. Otherwise, this value is + handled like nil. + +`temp-buffer' means that splitting a window for displaying a temporary + buffer always makes a new parent window. Otherwise, this value is + handled like nil. + + +`display-buffer' means that splitting a window for displaying a buffer + always makes a new parent window. Since temporary buffers are + displayed by the function `display-buffer', this value is stronger + than `temp-buffer'. Splitting a window for other purpose makes a + new parent window only if needed. + +t means that splitting a window always creates a new parent window. If + all splits behave this way, each frame's window tree is a binary + tree and every window but the frame's root window has exactly one + sibling. + +Other values are reserved for future use. */); + Vwindow_combination_limit = Qtemp_buffer_resize; DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters, doc: /* Alist of persistent window parameters. ------------------------------------------------------------ revno: 110136 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-09-22 15:49:25 +0300 message: src/dispextern.h: Fix commentary for struct it's string_nchars member. diff: === modified file 'src/dispextern.h' --- src/dispextern.h 2012-09-13 02:21:28 +0000 +++ src/dispextern.h 2012-09-22 12:49:25 +0000 @@ -2138,7 +2138,8 @@ const unsigned char *s; /* Number of characters in the string (s, or it->string) we iterate - over. */ + over. Used only in display_string and its subroutines; never + used for overlay strings and strings from display properties. */ ptrdiff_t string_nchars; /* Start and end of a visible region; -1 if the region is not ------------------------------------------------------------ revno: 110135 fixes bug: http://debbugs.gnu.org/10159 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-09-22 15:31:05 +0300 message: Fix bug #10159 with crashes in auto-complete package. src/xdisp.c (next_overlay_string): Initialize it->end_charpos for the new overlay string. Otherwise, the call to composition_compute_stop_pos in compute_stop_pos uses a wrong it->end_charpos value, and crashes because it runs off the end of the overlay string. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-22 07:34:52 +0000 +++ src/ChangeLog 2012-09-22 12:31:05 +0000 @@ -1,3 +1,8 @@ +2012-09-22 Eli Zaretskii + + * xdisp.c (next_overlay_string): Initialize it->end_charpos for + the new overlay string. (Bug#10159) + 2012-09-22 Paul Eggert * emacs.c (shut_down_emacs): Don't assume stderr is buffered, === modified file 'src/xdisp.c' --- src/xdisp.c 2012-09-21 03:03:48 +0000 +++ src/xdisp.c 2012-09-22 12:31:05 +0000 @@ -5346,6 +5346,7 @@ SET_TEXT_POS (it->current.string_pos, 0, 0); it->method = GET_FROM_STRING; it->stop_charpos = 0; + it->end_charpos = SCHARS (it->string); if (it->cmp_it.stop_pos >= 0) it->cmp_it.stop_pos = 0; it->prev_stop = 0; ------------------------------------------------------------ revno: 110134 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-22 03:59:13 -0700 message: * Makefile.in (bootstrap): Simplify build procedure. Suggested by Wolfgang Jenker in . diff: === modified file 'ChangeLog' --- ChangeLog 2012-09-22 09:46:20 +0000 +++ ChangeLog 2012-09-22 10:59:13 +0000 @@ -1,5 +1,9 @@ 2012-09-22 Paul Eggert + * Makefile.in (bootstrap): Simplify build procedure. + Suggested by Wolfgang Jenker in + . + Merge from gnulib, incorporating: 2012-09-22 sockets, sys_stat: remove AC_C_INLINE in MSVC-only cases === modified file 'Makefile.in' --- Makefile.in 2012-09-17 22:43:12 +0000 +++ Makefile.in 2012-09-22 10:59:13 +0000 @@ -889,18 +889,13 @@ .PHONY: bootstrap # Bootstrapping does the following: -# * Remove files to start from a clean slate. +# * Remove files to start from a bootstrap-clean slate. # * Run autogen.sh, falling back on copy_autogen if autogen.sh fails. -# * Build Makefile, to build the build procedure itself. +# * Rebuild Makefile, to update the build procedure itself. # * Do the actual build. bootstrap: bootstrap-clean FRC cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; } - if [ -x config.status ]; then \ - ./config.status --recheck && \ - ./config.status; \ - else \ - $(srcdir)/configure $(CONFIGURE_FLAGS); \ - fi + $(MAKE) $(MFLAGS) Makefile $(MAKE) $(MFLAGS) info all .PHONY: check-declare ------------------------------------------------------------ revno: 110133 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-22 06:17:30 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-09-19 10:17:35 +0000 +++ autogen/configure 2012-09-22 10:17:30 +0000 @@ -23382,8 +23382,6 @@ - - if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_stat_h='<'sys/stat.h'>' else ------------------------------------------------------------ revno: 110132 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-22 02:46:20 -0700 message: Merge from gnulib. diff: === modified file 'ChangeLog' --- ChangeLog 2012-09-19 17:35:18 +0000 +++ ChangeLog 2012-09-22 09:46:20 +0000 @@ -1,3 +1,8 @@ +2012-09-22 Paul Eggert + + Merge from gnulib, incorporating: + 2012-09-22 sockets, sys_stat: remove AC_C_INLINE in MSVC-only cases + 2012-09-19 Tassilo Horn * doc/emacs/misc.texi (DocView Slicing): Document new slice from === modified file 'm4/sys_stat_h.m4' --- m4/sys_stat_h.m4 2012-05-26 23:14:36 +0000 +++ m4/sys_stat_h.m4 2012-09-22 09:46:20 +0000 @@ -1,4 +1,4 @@ -# sys_stat_h.m4 serial 27 -*- Autoconf -*- +# sys_stat_h.m4 serial 28 -*- Autoconf -*- dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -11,9 +11,6 @@ [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - dnl For the mkdir substitute. - AC_REQUIRE([AC_C_INLINE]) - dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) ------------------------------------------------------------ revno: 110131 committer: Stefan Merten branch nick: trunk timestamp: Sat 2012-09-22 11:16:00 +0200 message: * rst.el: Revamp section title faces. (rst-official-version) (rst-package-emacs-version-alist): Sync with official version V1.4.0. (rst-faces-defaults, rst-set-level-default) (rst-level-face-max, rst-level-face-base-color) (rst-level-face-base-light, rst-level-face-format-light) (rst-level-face-step-light, rst-define-level-faces): Obsolete. (rst-adornment-faces-alist): Match new setup. (rst-level-1, rst-level-2, rst-level-3, rst-level-4) (rst-level-5, rst-level-6): New faces. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-22 03:07:39 +0000 +++ lisp/ChangeLog 2012-09-22 09:16:00 +0000 @@ -1,3 +1,17 @@ +2012-09-22 Stefan Merten + + * rst.el: Revamp section title faces. + (rst-official-version) + (rst-package-emacs-version-alist): Sync with official version + V1.4.0. + (rst-faces-defaults, rst-set-level-default) + (rst-level-face-max, rst-level-face-base-color) + (rst-level-face-base-light, rst-level-face-format-light) + (rst-level-face-step-light, rst-define-level-faces): Obsolete. + (rst-adornment-faces-alist): Match new setup. + (rst-level-1, rst-level-2, rst-level-3, rst-level-4) + (rst-level-5, rst-level-6): New faces. + 2012-09-22 Chong Yidong * simple.el (undo): Handle indirect buffers (Bug#8207). === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2012-09-20 18:59:00 +0000 +++ lisp/textmodes/rst.el 2012-09-22 09:16:00 +0000 @@ -217,7 +217,7 @@ ;; Use CVSHeader to really get information from CVS and not other version ;; control systems. (defconst rst-cvs-header - "$CVSHeader: sm/rst_el/rst.el,v 1.324 2012-09-20 18:52:46 stefan Exp $") + "$CVSHeader: sm/rst_el/rst.el,v 1.327.2.1 2012-09-22 09:06:56 stefan Exp $") (defconst rst-cvs-rev (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" " .*" rst-cvs-header "0.0") @@ -231,22 +231,22 @@ ;; Use LastChanged... to really get information from SVN. (defconst rst-svn-rev (rst-extract-version "\\$" "LastChangedRevision: " "[0-9]+" " " - "$LastChangedRevision: 7490 $") + "$LastChangedRevision: 7515 $") "The SVN revision of this file. SVN revision is the upstream (docutils) revision.") (defconst rst-svn-timestamp (rst-extract-version "\\$" "LastChangedDate: " ".+?+" " " - "$LastChangedDate: 2012-07-30 21:29:33 +0200 (Mon, 30 Jul 2012) $") + "$LastChangedDate: 2012-09-20 23:28:53 +0200 (Thu, 20 Sep 2012) $") "The SVN time stamp of this file.") ;; Maintained by the release process. (defconst rst-official-version (rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " - "%OfficialVersion: 1.3.1 %") + "%OfficialVersion: 1.4.0 %") "Official version of the package.") (defconst rst-official-cvs-rev (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " - "%Revision: 1.301 %") + "$Revision: 1.327.2.1 $") "CVS revision of this file in the official version.") (defconst rst-version @@ -265,6 +265,7 @@ ("1.2.1" . "24.3") ("1.3.0" . "24.3") ("1.3.1" . "24.3") + ("1.4.0" . "24.3") )) (unless (assoc rst-official-version rst-package-emacs-version-alist) @@ -3359,118 +3360,64 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; FIXME LEVEL-FACE: May be this complicated mechanism should be replaced -;; simply by a number of customizable faces `rst-header-%d' -;; which by default are set properly for dark and light -;; background. Initialization should come from the old -;; variables if they exist. A maximum level of 6 should -;; suffice - after that the last level should be repeated. -;; Only `rst-adornment-faces-alist' is needed outside this -;; block. Would also fix docutils-Bugs-3479594. - -(defgroup rst-faces-defaults nil - "Values used to generate default faces for section titles on all levels. -Tweak these if you are content with how section title faces are built in -general but you do not like the details." - :group 'rst-faces - :version "21.1") - -(defun rst-set-level-default (sym val) - "Set custom variable SYM affecting section title text face. -Recompute the faces. VAL is the value to set." - (custom-set-default sym val) - ;; Also defines the faces initially when all values are available. - (and (boundp 'rst-level-face-max) - (boundp 'rst-level-face-format-light) - (boundp 'rst-level-face-base-color) - (boundp 'rst-level-face-step-light) - (boundp 'rst-level-face-base-light) - (fboundp 'rst-define-level-faces) - (rst-define-level-faces))) - -;; Faces for displaying items on several levels. These definitions define -;; different shades of gray where the lightest one (i.e. least contrasting on a -;; light background) is used for level 1. -(defcustom rst-level-face-max 6 - "Maximum depth of levels for which section title faces are defined." - :group 'rst-faces-defaults - :type '(integer) - :set 'rst-set-level-default) -(rst-testcover-defcustom) -;; FIXME: It should be possible to give "#RRGGBB" type of color values. -;; Together with a `rst-level-face-end-light' this could be used for -;; computing steps. -;; FIXME: This variable should be combined with `rst-level-face-format-light' -;; to a single string. -(defcustom rst-level-face-base-color "grey" - "Base name of the color for creating background colors in section title faces." - :group 'rst-faces-defaults - :type '(string) - :set 'rst-set-level-default) -(rst-testcover-defcustom) -;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify -;; how they behave for dark and light background using the -;; relevant options explained in `defface'. -(defcustom rst-level-face-base-light - (if (eq frame-background-mode 'dark) - 15 - 85) - "The lightness factor for the base color. This value is used for level 1. -The default depends on whether the value of `frame-background-mode' is -`dark' or not." - :group 'rst-faces-defaults - :type '(integer) - :set 'rst-set-level-default) -(rst-testcover-defcustom) -(defcustom rst-level-face-format-light "%2d" - "The format for the lightness factor appended to the base name of the color. -This value is expanded by `format' with an integer." - :group 'rst-faces-defaults - :type '(string) - :set 'rst-set-level-default) -(rst-testcover-defcustom) -;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify -;; how they behave for dark and light background using the -;; relevant options explained in `defface'. -;; FIXME: Alternatively there could be a customizable variable -;; `rst-level-face-end-light' which defines the end value and steps are -;; computed -(defcustom rst-level-face-step-light - (if (eq frame-background-mode 'dark) - 7 - -7) - "The step width to use for the next color. -The formula - - `rst-level-face-base-light' - + (`rst-level-face-max' - 1) * `rst-level-face-step-light' - -must result in a color level which appended to `rst-level-face-base-color' -using `rst-level-face-format-light' results in a valid color such as `grey50'. -This color is used as background for section title text on level -`rst-level-face-max'." - :group 'rst-faces-defaults - :type '(integer) - :set 'rst-set-level-default) -(rst-testcover-defcustom) +(dolist (var '(rst-level-face-max rst-level-face-base-color + rst-level-face-base-light + rst-level-face-format-light + rst-level-face-step-light + rst-level-1-face + rst-level-2-face + rst-level-3-face + rst-level-4-face + rst-level-5-face + rst-level-6-face)) + (make-obsolete-variable var "customize the faces `rst-level-*' instead." + "24.3")) + +;; Define faces for the first 6 levels. More levels are possible, however. +(defface rst-level-1 '((((background light)) (:background "grey85")) + (((background dark)) (:background "grey15"))) + "Default face for section title text at level 1." + :package-version '(rst . "1.4.0")) + +(defface rst-level-2 '((((background light)) (:background "grey78")) + (((background dark)) (:background "grey22"))) + "Default face for section title text at level 2." + :package-version '(rst . "1.4.0")) + +(defface rst-level-3 '((((background light)) (:background "grey71")) + (((background dark)) (:background "grey29"))) + "Default face for section title text at level 3." + :package-version '(rst . "1.4.0")) + +(defface rst-level-4 '((((background light)) (:background "grey64")) + (((background dark)) (:background "grey36"))) + "Default face for section title text at level 4." + :package-version '(rst . "1.4.0")) + +(defface rst-level-5 '((((background light)) (:background "grey57")) + (((background dark)) (:background "grey43"))) + "Default face for section title text at level 5." + :package-version '(rst . "1.4.0")) + +(defface rst-level-6 '((((background light)) (:background "grey50")) + (((background dark)) (:background "grey50"))) + "Default face for section title text at level 6." + :package-version '(rst . "1.4.0")) (defcustom rst-adornment-faces-alist - ;; FIXME LEVEL-FACE: Must be redone if `rst-level-face-max' is changed - (let ((alist (copy-sequence '((t . rst-transition) - (nil . rst-adornment)))) - (i 1)) - (while (<= i rst-level-face-max) - ;; FIXME: why not `push'? - (nconc alist (list (cons i (intern (format "rst-level-%d-face" i))))) - (setq i (1+ i))) - alist) - "Faces for the various adornment types. + '((t . rst-transition) + (nil . rst-adornment) + (1 . rst-level-1) + (2 . rst-level-2) + (3 . rst-level-3) + (4 . rst-level-4) + (5 . rst-level-5) + (6 . rst-level-6)) + "Faces for the various adornment types. Key is a number (for the section title text of that level starting with 1), t (for transitions) or nil (for section title -adornment). If you generally do not like how section title text -faces are set up tweak here. If the general idea is ok for you -but you do not like the details check the Rst Faces Defaults -group." +adornment). If you need levels beyond 6 you have to define faces +of your own." :group 'rst-faces :type '(alist :key-type @@ -3478,34 +3425,9 @@ (integer :tag "Section level") (const :tag "transitions" t) (const :tag "section title adornment" nil)) - :value-type (face)) - :set-after '(rst-level-face-max)) + :value-type (face))) (rst-testcover-defcustom) -(defun rst-define-level-faces () - "Define the faces for the section title text faces from the values." - ;; All variables used here must be checked in `rst-set-level-default'. - (let ((i 1)) - (while (<= i rst-level-face-max) - (let ((sym (intern (format "rst-level-%d-face" i))) - (doc (format "Default face for showing section title text at level %d. -This symbol is *not* meant for customization but modified if a -variable of the `rst-faces-defaults' group is customized. Use -`rst-adornment-faces-alist' for customization instead." i)) - (col (format (concat "%s" rst-level-face-format-light) - rst-level-face-base-color - (+ (* (1- i) rst-level-face-step-light) - rst-level-face-base-light)))) - (make-empty-face sym) - (set-face-doc-string sym doc) - (set-face-background sym col) - (set sym sym) - (setq i (1+ i)))))) - -;; FIXME LEVEL-FACE: This is probably superfluous since it is done by the -;; customization / `rst-set-level-default'. -(rst-define-level-faces) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar rst-font-lock-keywords ------------------------------------------------------------ revno: 110130 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-22 01:22:49 -0700 message: Do not truncate strsignal output. diff: === modified file 'src/emacs.c' --- src/emacs.c 2012-09-22 07:34:52 +0000 +++ src/emacs.c 2012-09-22 08:22:49 +0000 @@ -2015,10 +2015,12 @@ reset_all_sys_modes (); if (sig && sig != SIGTERM) { - char buf[100]; - int buflen = snprintf (buf, sizeof buf, "Fatal error %d: %s", - sig, strsignal (sig)); + static char const format[] = "Fatal error %d: "; + char buf[sizeof format - 2 + INT_STRLEN_BOUND (int)]; + int buflen = sprintf (buf, format, sig); + char const *sig_desc = strsignal (sig); ignore_value (write (STDERR_FILENO, buf, buflen)); + ignore_value (write (STDERR_FILENO, sig_desc, strlen (sig_desc))); } } } ------------------------------------------------------------ revno: 110129 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-22 00:34:52 -0700 message: * emacs.c (shut_down_emacs): Don't assume stderr is buffered, or that fprintf is async-signal-safe. POSIX doesn't require either assumption. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-22 03:07:39 +0000 +++ src/ChangeLog 2012-09-22 07:34:52 +0000 @@ -1,3 +1,9 @@ +2012-09-22 Paul Eggert + + * emacs.c (shut_down_emacs): Don't assume stderr is buffered, + or that fprintf is async-signal-safe. POSIX doesn't require + either assumption. + 2012-09-22 Chong Yidong * buffer.c (Fset_buffer_modified_p): Handle indirect buffers === modified file 'src/emacs.c' --- src/emacs.c 2012-09-17 00:56:08 +0000 +++ src/emacs.c 2012-09-22 07:34:52 +0000 @@ -27,6 +27,8 @@ #include #include +#include + #include "lisp.h" #ifdef HAVE_WINDOW_SYSTEM @@ -2012,7 +2014,12 @@ { reset_all_sys_modes (); if (sig && sig != SIGTERM) - fprintf (stderr, "Fatal error %d: %s", sig, strsignal (sig)); + { + char buf[100]; + int buflen = snprintf (buf, sizeof buf, "Fatal error %d: %s", + sig, strsignal (sig)); + ignore_value (write (STDERR_FILENO, buf, buflen)); + } } } #else ------------------------------------------------------------ revno: 110128 fixes bug: http://debbugs.gnu.org/11148 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-09-22 11:29:37 +0800 message: * frames.texi (Pop-Up Menus): Minor clarification for x-popup-menu. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-09-21 03:22:27 +0000 +++ doc/lispref/ChangeLog 2012-09-22 03:29:37 +0000 @@ -1,3 +1,7 @@ +2012-09-22 Chong Yidong + + * frames.texi (Pop-Up Menus): Minor clarification (Bug#11148). + 2012-09-21 Glenn Morris * debugging.texi (Using Debugger): Fix typo. === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2012-05-27 01:34:14 +0000 +++ doc/lispref/frames.texi 2012-09-22 03:29:37 +0000 @@ -1773,10 +1773,12 @@ (@var{title} @var{item1} @var{item2}...) @end example -Each item should normally be a cons cell @code{(@var{line} . @var{value})}, -where @var{line} is a string, and @var{value} is the value to return if -that @var{line} is chosen. An item can also be a string; this makes a -non-selectable line in the menu. +Each @var{item} should be a cons cell, @code{(@var{line} . @var{value})}, +where @var{line} is a string and @var{value} is the value to return if +that @var{line} is chosen. Unlike in a menu keymap, a @code{nil} +@var{value} does not make the menu item non-selectable. +Alternatively, each @var{item} can be a string rather than a cons +cell; this makes a non-selectable menu item. If the user gets rid of the menu without making a valid choice, for instance by clicking the mouse away from a valid choice or by typing