------------------------------------------------------------ revno: 116254 committer: Glenn Morris branch nick: trunk timestamp: Sun 2014-02-02 23:56:44 -0800 message: Tidy up some -to-register function argument specs * lisp/register.el (window-configuration-to-register) (frame-configuration-to-register): Unadvertise unused argument. * lisp/frameset.el (frameset-to-register): Remove unused argument. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-03 07:35:44 +0000 +++ lisp/ChangeLog 2014-02-03 07:56:44 +0000 @@ -1,6 +1,9 @@ 2014-02-03 Glenn Morris - * frameset.el (frameset-to-register): + * register.el (window-configuration-to-register) + (frame-configuration-to-register): Unadvertise unused argument. + * frameset.el (frameset-to-register): Remove unused argument. + * kmacro.el (kmacro-to-register): * register.el (increment-register): * calc/calc-yank.el (calc-copy-to-register, calc-insert-register) === modified file 'lisp/frameset.el' --- lisp/frameset.el 2014-02-03 00:40:49 +0000 +++ lisp/frameset.el 2014-02-03 07:56:44 +0000 @@ -1220,14 +1220,13 @@ (goto-char (aref data 2)))))) ;;;###autoload -(defun frameset-to-register (register &optional _arg) +(defun frameset-to-register (register) "Store the current frameset in register REGISTER. Use \\[jump-to-register] to restore the frameset. Argument is a character, naming the register. Interactively, reads the register using `register-read-with-preview'." - (interactive (list (register-read-with-preview "Frameset to register: ") - current-prefix-arg)) + (interactive (list (register-read-with-preview "Frameset to register: "))) (set-register register (registerv-make (vector (frameset-save nil === modified file 'lisp/register.el' --- lisp/register.el 2014-02-03 00:40:49 +0000 +++ lisp/register.el 2014-02-03 07:56:44 +0000 @@ -201,6 +201,10 @@ ;; of point in the current buffer, so record that separately. (set-register register (list (current-window-configuration) (point-marker)))) +;; It has had the optional arg for ages, but never used it. +(set-advertised-calling-convention 'window-configuration-to-register + '(register) "24.4") + (defun frame-configuration-to-register (register &optional _arg) "Store the window configuration of all frames in register REGISTER. Use \\[jump-to-register] to restore the configuration. @@ -214,6 +218,10 @@ ;; of point in the current buffer, so record that separately. (set-register register (list (current-frame-configuration) (point-marker)))) +;; It has had the optional arg for ages, but never used it. +(set-advertised-calling-convention 'frame-configuration-to-register + '(register) "24.4") + (defalias 'register-to-point 'jump-to-register) (defun jump-to-register (register &optional delete) "Move point to location stored in a register. ------------------------------------------------------------ revno: 116253 committer: Glenn Morris branch nick: trunk timestamp: Sun 2014-02-02 23:35:44 -0800 message: Revert earlier desktop-auto-save doc changes I don't understand this feature. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-02-03 03:12:29 +0000 +++ doc/emacs/ChangeLog 2014-02-03 07:35:44 +0000 @@ -1,7 +1,3 @@ -2014-02-03 Glenn Morris - - * misc.texi (Saving Emacs Sessions): Mention desktop-auto-save-timeout. - 2014-02-02 Glenn Morris * regs.texi (Registers): Mention previewing. === modified file 'doc/emacs/misc.texi' --- doc/emacs/misc.texi 2014-02-03 03:12:29 +0000 +++ doc/emacs/misc.texi 2014-02-03 07:35:44 +0000 @@ -2141,8 +2141,7 @@ @vindex desktop-save-mode You can save the desktop manually with the command @kbd{M-x desktop-save}. You can also enable automatic saving of the desktop -at regular intervals and when you exit Emacs, and automatic restoration -of the last saved +when you exit Emacs, and automatic restoration of the last saved desktop when Emacs starts: use the Customization buffer (@pxref{Easy Customization}) to set @code{desktop-save-mode} to @code{t} for future sessions, or add this line in your init file (@pxref{Init File}): @@ -2151,11 +2150,6 @@ (desktop-save-mode 1) @end example -@vindex desktop-auto-save-timeout -@noindent -Emacs then auto-saves the desktop every @code{desktop-auto-save-timeout} -seconds, if that is non-@code{nil} and non-zero. - @findex desktop-change-dir @findex desktop-revert @vindex desktop-path === modified file 'etc/NEWS' --- etc/NEWS 2014-02-03 03:12:29 +0000 +++ etc/NEWS 2014-02-03 07:35:44 +0000 @@ -458,9 +458,8 @@ ** Desktop -+++ -*** By default, the desktop is now auto-saved after `desktop-auto-save-timeout'. -To disable this, customize that option to nil (or zero). +*** `desktop-auto-save-timeout' defines the number of seconds idle time +before auto-save of the desktop. *** `desktop-restore-frames', enabled by default, allows saving and restoring the frame/window configuration (frameset). Additional options === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-03 03:12:29 +0000 +++ lisp/ChangeLog 2014-02-03 07:35:44 +0000 @@ -1,7 +1,5 @@ 2014-02-03 Glenn Morris - * desktop.el (desktop-save-mode): Doc fix. - * frameset.el (frameset-to-register): * kmacro.el (kmacro-to-register): * register.el (increment-register): === modified file 'lisp/desktop.el' --- lisp/desktop.el 2014-02-03 03:12:29 +0000 +++ lisp/desktop.el 2014-02-03 07:35:44 +0000 @@ -160,9 +160,7 @@ If Desktop Save mode is enabled, the state of Emacs is saved from one session to another. See variable `desktop-save' and function -`desktop-read' for details. - -For options you can set, browse the `desktop' customization group." +`desktop-read' for details." :global t :group 'desktop) ------------------------------------------------------------ revno: 116252 committer: Glenn Morris branch nick: trunk timestamp: Sun 2014-02-02 23:26:59 -0800 message: * doc/misc/cl.texi (Blocks and Exits): Tweak earlier change. diff: === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2014-02-03 02:58:13 +0000 +++ doc/misc/cl.texi 2014-02-03 07:26:59 +0000 @@ -1564,7 +1564,7 @@ (a statement). This distinction is made before macroexpansion. Statements are executed in sequence, discarding any return value. Any statement can transfer control at any time to the statements that follow -one of the labels with the special form @code{(go LABEL)}. +one of the labels with the special form @code{(go @var{label})}. Labels have lexical scope and dynamic extent. @end defmac ------------------------------------------------------------ revno: 116251 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2014-02-03 11:05:28 +0400 message: * print.c (Fexternal_debugging_output): Add cast to pacify --enable-gcc-warnings. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-02 13:00:41 +0000 +++ src/ChangeLog 2014-02-03 07:05:28 +0000 @@ -1,3 +1,8 @@ +2014-02-03 Dmitry Antipov + + * print.c (Fexternal_debugging_output): Add cast to pacify + --enable-gcc-warnings. + 2014-02-02 Martin Rudalics * w32fns.c (Fx_create_frame): Process frame alpha earlier. === modified file 'src/print.c' --- src/print.c 2014-02-01 11:53:10 +0000 +++ src/print.c 2014-02-03 07:05:28 +0000 @@ -731,7 +731,7 @@ unsigned char mbstr[MAX_MULTIBYTE_LENGTH]; ptrdiff_t len = CHAR_STRING (ch, mbstr); Lisp_Object encoded_ch = - ENCODE_SYSTEM (make_multibyte_string (mbstr, 1, len)); + ENCODE_SYSTEM (make_multibyte_string ((char *) mbstr, 1, len)); fwrite (SSDATA (encoded_ch), SBYTES (encoded_ch), 1, stderr); #ifdef WINDOWSNT ------------------------------------------------------------ revno: 116250 committer: Glenn Morris branch nick: trunk timestamp: Sun 2014-02-02 19:12:29 -0800 message: Some doc for desktop-auto-save-timeout * doc/emacs/misc.texi (Saving Emacs Sessions): Mention desktop-auto-save-timeout. * lisp/desktop.el (desktop-save-mode): Doc fix. * etc/NEWS: Related edit. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-02-02 01:04:08 +0000 +++ doc/emacs/ChangeLog 2014-02-03 03:12:29 +0000 @@ -1,3 +1,7 @@ +2014-02-03 Glenn Morris + + * misc.texi (Saving Emacs Sessions): Mention desktop-auto-save-timeout. + 2014-02-02 Glenn Morris * regs.texi (Registers): Mention previewing. === modified file 'doc/emacs/misc.texi' --- doc/emacs/misc.texi 2014-01-26 01:11:10 +0000 +++ doc/emacs/misc.texi 2014-02-03 03:12:29 +0000 @@ -2141,7 +2141,8 @@ @vindex desktop-save-mode You can save the desktop manually with the command @kbd{M-x desktop-save}. You can also enable automatic saving of the desktop -when you exit Emacs, and automatic restoration of the last saved +at regular intervals and when you exit Emacs, and automatic restoration +of the last saved desktop when Emacs starts: use the Customization buffer (@pxref{Easy Customization}) to set @code{desktop-save-mode} to @code{t} for future sessions, or add this line in your init file (@pxref{Init File}): @@ -2150,6 +2151,11 @@ (desktop-save-mode 1) @end example +@vindex desktop-auto-save-timeout +@noindent +Emacs then auto-saves the desktop every @code{desktop-auto-save-timeout} +seconds, if that is non-@code{nil} and non-zero. + @findex desktop-change-dir @findex desktop-revert @vindex desktop-path === modified file 'etc/NEWS' --- etc/NEWS 2014-02-03 02:58:13 +0000 +++ etc/NEWS 2014-02-03 03:12:29 +0000 @@ -458,8 +458,9 @@ ** Desktop -*** `desktop-auto-save-timeout' defines the number of seconds idle time -before auto-save of the desktop. ++++ +*** By default, the desktop is now auto-saved after `desktop-auto-save-timeout'. +To disable this, customize that option to nil (or zero). *** `desktop-restore-frames', enabled by default, allows saving and restoring the frame/window configuration (frameset). Additional options === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-03 00:40:49 +0000 +++ lisp/ChangeLog 2014-02-03 03:12:29 +0000 @@ -1,5 +1,7 @@ 2014-02-03 Glenn Morris + * desktop.el (desktop-save-mode): Doc fix. + * frameset.el (frameset-to-register): * kmacro.el (kmacro-to-register): * register.el (increment-register): === modified file 'lisp/desktop.el' --- lisp/desktop.el 2014-01-01 07:43:34 +0000 +++ lisp/desktop.el 2014-02-03 03:12:29 +0000 @@ -160,7 +160,9 @@ If Desktop Save mode is enabled, the state of Emacs is saved from one session to another. See variable `desktop-save' and function -`desktop-read' for details." +`desktop-read' for details. + +For options you can set, browse the `desktop' customization group." :global t :group 'desktop) ------------------------------------------------------------ revno: 116249 committer: Glenn Morris branch nick: trunk timestamp: Sun 2014-02-02 18:58:13 -0800 message: * doc/misc/cl.texi (Blocks and Exits): Mention cl-tagbody. * etc/NEWS: Related edit. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-02-02 01:16:18 +0000 +++ doc/misc/ChangeLog 2014-02-03 02:58:13 +0000 @@ -1,3 +1,7 @@ +2014-02-03 Glenn Morris + + * cl.texi (Blocks and Exits): Mention cl-tagbody. + 2014-02-02 Glenn Morris * efaq-w32.texi (Tramp ssh): Remove deleted tramp methods. === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2014-01-10 19:40:32 +0000 +++ doc/misc/cl.texi 2014-02-03 02:58:13 +0000 @@ -1556,6 +1556,19 @@ themselves in @code{nil} blocks. @end defmac +@c FIXME? Maybe this should be in a separate section? +@defmac cl-tagbody &rest labels-or-statements +This macro executes statements while allowing for control transfer to +user-defined labels. Each element of @var{labels-or-statements} can +be either a label (an integer or a symbol), or a cons-cell +(a statement). This distinction is made before macroexpansion. +Statements are executed in sequence, discarding any return value. +Any statement can transfer control at any time to the statements that follow +one of the labels with the special form @code{(go LABEL)}. +Labels have lexical scope and dynamic extent. +@end defmac + + @node Iteration @section Iteration === modified file 'etc/NEWS' --- etc/NEWS 2014-02-03 01:03:11 +0000 +++ etc/NEWS 2014-02-03 02:58:13 +0000 @@ -424,7 +424,9 @@ ** cl-lib ++++ *** New macro `cl-tagbody'. +This executes statements while allowing for control transfer to labels. +++ *** letf is now just an alias for cl-letf. ------------------------------------------------------------ revno: 116248 committer: Glenn Morris branch nick: trunk timestamp: Sun 2014-02-02 17:03:11 -0800 message: * etc/NEWS: Mention register-read-with-preview. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-02-02 01:16:18 +0000 +++ etc/NEWS 2014-02-03 01:03:11 +0000 @@ -305,6 +305,8 @@ *** All interactive commands that read a register (`copy-to-register', etc.) now display a temporary window after `register-preview-delay' seconds that summarizes existing registers. To disable this, set that option to nil. +Interactive commands that read registers and want to make use of this +should use `register-read-with-preview' to read register names. +++ *** New command `C-x C-k x' (`kmacro-to-register') stores keyboard ------------------------------------------------------------ revno: 116247 committer: Glenn Morris branch nick: trunk timestamp: Sun 2014-02-02 16:40:49 -0800 message: Be more consistent in using register-read-with-preview to read registers * frameset.el (frameset-to-register): * kmacro.el (kmacro-to-register): * register.el (increment-register): * calc/calc-yank.el (calc-copy-to-register, calc-insert-register) (calc-append-to-register, calc-prepend-to-register): * play/gametree.el (gametree-layout-to-register) (gametree-apply-register-layout): * textmodes/picture.el (picture-clear-rectangle-to-register) (picture-yank-rectangle-from-register): * vc/emerge.el (emerge-combine-versions-register): Use register-read-with-preview to read registers. * cedet/semantic/senator.el (senator-copy-tag-to-register): Use register-read-with-preview, if available. * calculator.el, emulation/viper-cmd.el: Comments. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-03 00:28:57 +0000 +++ lisp/ChangeLog 2014-02-03 00:40:49 +0000 @@ -1,3 +1,17 @@ +2014-02-03 Glenn Morris + + * frameset.el (frameset-to-register): + * kmacro.el (kmacro-to-register): + * register.el (increment-register): + * calc/calc-yank.el (calc-copy-to-register, calc-insert-register) + (calc-append-to-register, calc-prepend-to-register): + * play/gametree.el (gametree-layout-to-register) + (gametree-apply-register-layout): + * textmodes/picture.el (picture-clear-rectangle-to-register) + (picture-yank-rectangle-from-register): + * vc/emerge.el (emerge-combine-versions-register): + Use register-read-with-preview to read registers. + 2014-02-03 João Távora * elec-pair.el (electric-pair-backward-delete-char): Don't error === modified file 'lisp/calc/calc-yank.el' --- lisp/calc/calc-yank.el 2014-01-06 06:25:30 +0000 +++ lisp/calc/calc-yank.el 2014-02-03 00:40:49 +0000 @@ -163,8 +163,12 @@ (defun calc-copy-to-register (register start end &optional delete-flag) "Copy the lines in the region into register REGISTER. -With prefix arg, delete as well." - (interactive "cCopy to register: \nr\nP") +With prefix arg, delete as well. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Copy to register: ") + (region-beginning) (region-end) + current-prefix-arg)) (if (eq major-mode 'calc-mode) (let* ((top-num (calc-locate-cursor-element start)) (top-pos (save-excursion @@ -183,8 +187,10 @@ (copy-to-register register start end delete-flag))) (defun calc-insert-register (register) - "Insert the contents of register REGISTER." - (interactive "cInsert register: ") + "Insert the contents of register REGISTER. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Insert register: "))) (if (eq major-mode 'calc-mode) (let ((val (calc-get-register register))) (calc-wrapper @@ -237,16 +243,24 @@ (defun calc-append-to-register (register start end &optional delete-flag) "Copy the lines in the region to the end of register REGISTER. -With prefix arg, also delete the region." - (interactive "cAppend to register: \nr\nP") +With prefix arg, also delete the region. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Append to register: ") + (region-beginning) (region-end) + current-prefix-arg)) (if (eq major-mode 'calc-mode) (calc-add-to-register register start end nil delete-flag) (append-to-register register start end delete-flag))) (defun calc-prepend-to-register (register start end &optional delete-flag) "Copy the lines in the region to the beginning of register REGISTER. -With prefix arg, also delete the region." - (interactive "cPrepend to register: \nr\nP") +With prefix arg, also delete the region. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Prepend to register: ") + (region-beginning) (region-end) + current-prefix-arg)) (if (eq major-mode 'calc-mode) (calc-add-to-register register start end t delete-flag) (prepend-to-register register start end delete-flag))) === modified file 'lisp/calculator.el' --- lisp/calculator.el 2014-01-01 07:43:34 +0000 +++ lisp/calculator.el 2014-02-03 00:40:49 +0000 @@ -1618,6 +1618,8 @@ (setq s (match-string 1 s))) (kill-new s))))) +;; FIXME this should use register-read-with-preview, but it +;; uses calculator-registers rather than register-alist. (defun calculator-set-register (reg) "Set a register value for REG." (interactive "cRegister to store into: ") @@ -1660,6 +1662,8 @@ (or (match-string 3 str) "")))) (ignore-errors (calculator-string-to-number str))))) +;; FIXME this should use register-read-with-preview, but it +;; uses calculator-registers rather than register-alist. (defun calculator-get-register (reg) "Get a value from a register REG." (interactive "cRegister to get value from: ") === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2014-01-15 03:06:07 +0000 +++ lisp/cedet/ChangeLog 2014-02-03 00:40:49 +0000 @@ -1,3 +1,8 @@ +2014-02-03 Glenn Morris + + * semantic/senator.el (senator-copy-tag-to-register): + Use register-read-with-preview, if available. + 2014-01-13 Eric Ludlam * semantic/analyze/refs.el (semantic-analyze-refs-impl): Fix typo === modified file 'lisp/cedet/semantic/senator.el' --- lisp/cedet/semantic/senator.el 2014-01-01 07:43:34 +0000 +++ lisp/cedet/semantic/senator.el 2014-02-03 00:40:49 +0000 @@ -722,8 +722,14 @@ (defun senator-copy-tag-to-register (register &optional kill-flag) "Copy the current tag into REGISTER. Optional argument KILL-FLAG will delete the text of the tag to the -kill ring." - (interactive "cTag to register: \nP") +kill ring. + +Interactively, reads the register using `register-read-with-preview', +if available." + (interactive (list (if (fboundp 'register-read-with-preview) + (register-read-with-preview "Tag to register: ") + (read-char "Tag to register: ")) + current-prefix-arg)) (semantic-fetch-tags) (let ((ft (semantic-obtain-foreign-tag))) (when ft === modified file 'lisp/emulation/viper-cmd.el' --- lisp/emulation/viper-cmd.el 2014-01-08 19:16:10 +0000 +++ lisp/emulation/viper-cmd.el 2014-02-03 00:40:49 +0000 @@ -4831,6 +4831,7 @@ (beep 1)) +;; FIXME Use register-read-with-preview? ;; if ENFORCE-BUFFER is not nil, error if CHAR is a marker in another buffer (defun viper-register-to-point (char &optional enforce-buffer) "Like `jump-to-register', but switches to another buffer in another window." === modified file 'lisp/frameset.el' --- lisp/frameset.el 2014-01-01 07:43:34 +0000 +++ lisp/frameset.el 2014-02-03 00:40:49 +0000 @@ -1223,8 +1223,11 @@ (defun frameset-to-register (register &optional _arg) "Store the current frameset in register REGISTER. Use \\[jump-to-register] to restore the frameset. -Argument is a character, naming the register." - (interactive "cFrameset to register: \nP") +Argument is a character, naming the register. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Frameset to register: ") + current-prefix-arg)) (set-register register (registerv-make (vector (frameset-save nil === modified file 'lisp/kmacro.el' --- lisp/kmacro.el 2014-01-01 07:43:34 +0000 +++ lisp/kmacro.el 2014-02-03 00:40:49 +0000 @@ -845,11 +845,13 @@ (kmacro-call-macro current-prefix-arg nil nil k)) (defun kmacro-to-register (r) - "Store the last keyboard macro in register R." + "Store the last keyboard macro in register R. + +Interactively, reads the register using `register-read-with-preview'." (interactive (progn (or last-kbd-macro (error "No keyboard macro defined")) - (list (read-char "Save to register: ")))) + (list (register-read-with-preview "Save to register: ")))) (set-register r (registerv-make last-kbd-macro :jump-func 'kmacro-execute-from-register === modified file 'lisp/play/gametree.el' --- lisp/play/gametree.el 2014-01-16 06:24:06 +0000 +++ lisp/play/gametree.el 2014-02-03 00:40:49 +0000 @@ -531,8 +531,10 @@ (defun gametree-layout-to-register (register) "Store current tree layout in register REGISTER. Use \\[gametree-apply-register-layout] to restore that configuration. -Argument is a character, naming the register." - (interactive "cLayout to register: ") +Argument is a character, naming the register. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Layout to register: "))) (save-excursion (goto-char (point-min)) (set-register register @@ -540,8 +542,13 @@ (defun gametree-apply-register-layout (char) "Return to a tree layout stored in a register. -Argument is a character, naming the register." - (interactive "*cApply layout from register: ") +Argument is a character, naming the register. + +Interactively, reads the register using `register-read-with-preview'." + (interactive + (progn + (barf-if-buffer-read-only) + (list (register-read-with-preview "Apply layout from register: ")))) (save-excursion (goto-char (point-min)) (gametree-apply-layout (get-register char) 0 t))) === modified file 'lisp/register.el' --- lisp/register.el 2014-02-02 03:42:20 +0000 +++ lisp/register.el 2014-02-03 00:40:49 +0000 @@ -296,8 +296,11 @@ PREFIX to it. If REGISTER is empty or if it contains text, call -`append-to-register' with `delete-flag' set to PREFIX." - (interactive "P\ncIncrement register: ") +`append-to-register' with `delete-flag' set to PREFIX. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list current-prefix-arg + (register-read-with-preview "Increment register: "))) (let ((register-val (get-register register))) (cond ((numberp register-val) === modified file 'lisp/textmodes/picture.el' --- lisp/textmodes/picture.el 2014-01-01 07:43:34 +0000 +++ lisp/textmodes/picture.el 2014-02-03 00:40:49 +0000 @@ -494,8 +494,12 @@ (defun picture-clear-rectangle-to-register (start end register &optional killp) "Clear rectangle delineated by point and mark into REGISTER. The rectangle is saved in REGISTER and replaced with whitespace. With -prefix argument, the rectangle is actually killed, shifting remaining text." - (interactive "r\ncRectangle to register: \nP") +prefix argument, the rectangle is actually killed, shifting remaining text. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (region-beginning) (region-end) + (register-read-with-preview "Rectangle to register: ") + current-prefix-arg)) (set-register register (picture-snarf-rectangle start end killp))) (defun picture-snarf-rectangle (start end &optional killp) @@ -534,8 +538,11 @@ The rectangle is positioned with upper left corner at point, overwriting existing text. With prefix argument, the rectangle is inserted instead, shifting existing text. Leaves mark at one corner -of rectangle and point at the other (diagonally opposed) corner." - (interactive "cRectangle from register: \nP") +of rectangle and point at the other (diagonally opposed) corner. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Rectangle from register: ") + current-prefix-arg)) (let ((rectangle (get-register register))) (if (not (consp rectangle)) (error "Register %c does not contain a rectangle" register) === modified file 'lisp/vc/emerge.el' --- lisp/vc/emerge.el 2013-09-05 03:30:07 +0000 +++ lisp/vc/emerge.el 2014-02-03 00:40:49 +0000 @@ -2516,8 +2516,12 @@ Refuses to function if this difference has been edited, i.e., if it is neither the A nor the B variant. An argument forces the variant to be selected even if the difference has -been edited." - (interactive "cRegister containing template: \nP") +been edited. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list + (register-read-with-preview "Register containing template: ") + current-prefix-arg)) (let ((template (get-register char))) (if (not (stringp template)) (error "Register does not contain text")) ------------------------------------------------------------ revno: 116246 committer: João Távora branch nick: trunk timestamp: Mon 2014-02-03 00:28:57 +0000 message: Fix `electric-pair-backward-delete-char' error at bob * lisp/elec-pair.el (electric-pair-backward-delete-char): Don't error when at beginning of (possibly narrowed) buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-02 22:21:33 +0000 +++ lisp/ChangeLog 2014-02-03 00:28:57 +0000 @@ -1,3 +1,8 @@ +2014-02-03 João Távora + + * elec-pair.el (electric-pair-backward-delete-char): Don't error + when at beginning of (possibly narrowed) buffer. + 2014-02-02 Daniel Colascione * help-at-pt.el (help-at-pt-string,help-at-pt-maybe-display): Also === modified file 'lisp/elec-pair.el' --- lisp/elec-pair.el 2014-01-05 02:56:08 +0000 +++ lisp/elec-pair.el 2014-02-03 00:28:57 +0000 @@ -174,13 +174,14 @@ (interactive "*p\nP") (let* ((prev (char-before)) (next (char-after)) - (syntax-info (electric-pair-syntax-info prev)) + (syntax-info (and prev + (electric-pair-syntax-info prev))) (syntax (car syntax-info)) (pair (cadr syntax-info))) - (when (and (if (functionp electric-pair-delete-adjacent-pairs) + (when (and next pair + (if (functionp electric-pair-delete-adjacent-pairs) (funcall electric-pair-delete-adjacent-pairs) electric-pair-delete-adjacent-pairs) - next (memq syntax '(?\( ?\" ?\$)) (eq pair next)) (delete-char 1 killflag)) ------------------------------------------------------------ revno: 116245 committer: Daniel Colascione branch nick: trunk timestamp: Sun 2014-02-02 14:21:33 -0800 message: Make help-at-point stuff also look just before point diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-02 16:28:52 +0000 +++ lisp/ChangeLog 2014-02-02 22:21:33 +0000 @@ -1,3 +1,8 @@ +2014-02-02 Daniel Colascione + + * help-at-pt.el (help-at-pt-string,help-at-pt-maybe-display): Also + try to display local help from just before point. + 2014-02-02 Alan Mackenzie c-parse-state. Don't "append-lower-brace-pair" in certain === modified file 'lisp/help-at-pt.el' --- lisp/help-at-pt.el 2014-01-01 07:43:34 +0000 +++ lisp/help-at-pt.el 2014-02-02 22:21:33 +0000 @@ -61,13 +61,18 @@ If KBD is non-nil, `kbd-help' is used instead, and any `help-echo' property is ignored. In this case, the return value can also be t, if that is the value of the `kbd-help' property." - (let* ((prop (if kbd 'kbd-help 'help-echo)) - (pair (get-char-property-and-overlay (point) prop)) - (val (car pair)) - (ov (cdr pair))) - (if (functionp val) - (funcall val (selected-window) (if ov ov (current-buffer)) (point)) - (eval val)))) + (save-excursion + (let* ((prop (if kbd 'kbd-help 'help-echo)) + (pair (get-char-property-and-overlay (point) prop)) + (pair (if (car pair) pair + (unless (bobp) + (backward-char) + (get-char-property-and-overlay (point) prop)))) + (val (car pair)) + (ov (cdr pair))) + (if (functionp val) + (funcall val (selected-window) (if ov ov (current-buffer)) (point)) + (eval val))))) ;;;###autoload (defun help-at-pt-kbd-string () @@ -235,7 +240,13 @@ (catch 'found (dolist (prop help-at-pt-display-when-idle) (if (get-char-property (point) prop) - (throw 'found t)))))) + (throw 'found t))) + (unless (bobp) + (save-excursion + (backward-char) + (dolist (prop help-at-pt-display-when-idle) + (if (get-char-property (point) prop) + (throw 'found t)))))))) (or (not (current-message)) (string= (current-message) "Quit")) (display-local-help t))) ------------------------------------------------------------ revno: 116244 committer: Alan Mackenzie branch nick: trunk timestamp: Sun 2014-02-02 16:28:52 +0000 message: c-parse-state. Don't "append-lower-brace-pair" in certain circumstances. Also fix an obscure bug where "\\s!" shouldn't be recognised as a comment. * progmodes/cc-engine.el (c-state-pp-to-literal): Check for "\\s!" as well as normal comment starter. (c-parse-state-get-strategy): Extra return possibility 'back-and-forward. (c-remove-stale-state-cache): Extra element CONS-SEPARATED in return value list to indicate replacement of a brace-pair cons with its car. (c-parse-state-1): With 'back-and-forward, only call c-append-lower-brace-pair-to state-cache when cons-separated. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-02 14:10:50 +0000 +++ lisp/ChangeLog 2014-02-02 16:28:52 +0000 @@ -1,3 +1,19 @@ +2014-02-02 Alan Mackenzie + + c-parse-state. Don't "append-lower-brace-pair" in certain + circumstances. Also fix an obscure bug where "\\s!" shouldn't be + recognised as a comment. + + * progmodes/cc-engine.el (c-state-pp-to-literal): Check for "\\s!" + as well as normal comment starter. + (c-parse-state-get-strategy): Extra return possibility + 'back-and-forward. + (c-remove-stale-state-cache): Extra element CONS-SEPARATED in + return value list to indicate replacement of a brace-pair cons + with its car. + (c-parse-state-1): With 'back-and-forward, only call + c-append-lower-brace-pair-to state-cache when cons-separated. + 2014-02-02 Jan Djärv * term/ns-win.el (ns-suspend-error): New function. === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2014-01-19 12:32:47 +0000 +++ lisp/progmodes/cc-engine.el 2014-02-02 16:28:52 +0000 @@ -2219,7 +2219,8 @@ ((and (not not-in-delimiter) ; inside a comment starter (not (bobp)) (progn (backward-char) - (looking-at c-comment-start-regexp))) + (and (not (looking-at "\\s!")) + (looking-at c-comment-start-regexp)))) (setq ty (if (looking-at c-block-comment-start-regexp) 'c 'c++) co-st (point)) (forward-comment 1) @@ -2552,8 +2553,11 @@ ;; The return value is a list, one of the following: ;; ;; o - ('forward START-POINT) - scan forward from START-POINT, - ;; which is not less than the highest position in `c-state-cache' below here. + ;; which is not less than the highest position in `c-state-cache' below HERE, + ;; which is after GOOD-POS. ;; o - ('backward nil) - scan backwards (from HERE). + ;; o - ('back-and-forward START-POINT) - like 'forward, but when HERE is earlier + ;; than GOOD-POS. ;; o - ('IN-LIT nil) - point is inside the literal containing point-min. (let ((cache-pos (c-get-cache-scan-pos here)) ; highest position below HERE in cache (or 1) strategy ; 'forward, 'backward, or 'IN-LIT. @@ -2568,9 +2572,9 @@ ((< (- good-pos here) (- here cache-pos)) ; FIXME!!! ; apply some sort of weighting. (setq strategy 'backward)) (t - (setq strategy 'forward + (setq strategy 'back-and-forward start-point cache-pos))) - (list strategy (and (eq strategy 'forward) start-point)))) + (list strategy start-point))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2842,9 +2846,10 @@ (defun c-remove-stale-state-cache (start-point here pps-point) ;; Remove stale entries from the `c-cache-state', i.e. those which will - ;; not be in it when it is amended for position HERE. Additionally, the - ;; "outermost" open-brace entry before HERE will be converted to a cons if - ;; the matching close-brace is scanned. + ;; not be in it when it is amended for position HERE. This may involve + ;; replacing a CONS element for a brace pair containing HERE with its car. + ;; Additionally, the "outermost" open-brace entry before HERE will be + ;; converted to a cons if the matching close-brace is below HERE. ;; ;; START-POINT is a "maximal" "safe position" - there must be no open ;; parens/braces/brackets between START-POINT and HERE. @@ -2855,7 +2860,7 @@ ;; adjust it to get outside a string/comment. (Sorry about this! The code ;; needs to be FAST). ;; - ;; Return a list (GOOD-POS SCAN-BACK-POS PPS-STATE), where + ;; Return a list (GOOD-POS SCAN-BACK-POS CONS-SEPARATED PPS-STATE), where ;; o - GOOD-POS is a position where the new value `c-state-cache' is known ;; to be good (we aim for this to be as high as possible); ;; o - SCAN-BACK-POS, if not nil, indicates there may be a brace pair @@ -2863,6 +2868,9 @@ ;; position to scan backwards from. It is the position of the "{" of the ;; last element to be removed from `c-state-cache', when that elt is a ;; cons, otherwise nil. + ;; o - CONS-SEPARATED is t when a cons element in `c-state-cache' has been + ;; replaced by its car because HERE lies inside the brace pair represented + ;; by the cons. ;; o - PPS-STATE is the parse-partial-sexp state at PPS-POINT. (save-excursion (save-restriction @@ -2890,6 +2898,7 @@ pos upper-lim ; ,beyond which `c-state-cache' entries are removed scan-back-pos + cons-separated pair-beg pps-point-state target-depth) ;; Remove entries beyond HERE. Also remove any entries inside @@ -2911,7 +2920,8 @@ (consp (car c-state-cache)) (> (cdar c-state-cache) upper-lim)) (setcar c-state-cache (caar c-state-cache)) - (setq scan-back-pos (car c-state-cache))) + (setq scan-back-pos (car c-state-cache) + cons-separated t)) ;; The next loop jumps forward out of a nested level of parens each ;; time round; the corresponding elements in `c-state-cache' are @@ -2983,7 +2993,7 @@ (setq c-state-cache (cons (cons pair-beg pos) c-state-cache))) - (list pos scan-back-pos pps-state))))) + (list pos scan-back-pos cons-separated pps-state))))) (defun c-remove-stale-state-cache-backwards (here) ;; Strip stale elements of `c-state-cache' by moving backwards through the @@ -3265,6 +3275,7 @@ ; are no open parens/braces between it and HERE. bopl-state res + cons-separated scan-backward-pos scan-forward-p) ; used for 'backward. ;; If POINT-MIN has changed, adjust the cache (unless (= (point-min) c-state-point-min) @@ -3277,13 +3288,15 @@ ;; SCAN! (cond - ((eq strategy 'forward) + ((memq strategy '(forward back-and-forward)) (setq res (c-remove-stale-state-cache start-point here here-bopl)) (setq cache-pos (car res) scan-backward-pos (cadr res) - bopl-state (car (cddr res))) ; will be nil if (< here-bopl + cons-separated (car (cddr res)) + bopl-state (cadr (cddr res))) ; will be nil if (< here-bopl ; start-point) - (if scan-backward-pos + (if (and scan-backward-pos + (or cons-separated (eq strategy 'forward))) ;scan-backward-pos (c-append-lower-brace-pair-to-state-cache scan-backward-pos here)) (setq good-pos (c-append-to-state-cache cache-pos here)) ------------------------------------------------------------ revno: 116243 fixes bug: http://debbugs.gnu.org/16612 committer: Jan D. branch nick: trunk timestamp: Sun 2014-02-02 15:10:50 +0100 message: Disallow suspend-emacs under NS * term/ns-win.el (ns-suspend-error): New function. (ns-initialize-window-system): Add ns-suspend-error to suspend-hook. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-02 10:25:29 +0000 +++ lisp/ChangeLog 2014-02-02 14:10:50 +0000 @@ -1,3 +1,9 @@ +2014-02-02 Jan Djärv + + * term/ns-win.el (ns-suspend-error): New function. + (ns-initialize-window-system): Add ns-suspend-error to + suspend-hook (Bug#16612). + 2014-02-02 Daniel Colascione * progmodes/cc-defs.el (c-find-assignment-for-mode): Make loading cc-mode silent. === modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2014-01-20 19:44:56 +0000 +++ lisp/term/ns-win.el 2014-02-02 14:10:50 +0000 @@ -863,6 +863,12 @@ (t nil)))) +(defun ns-suspend-error () + ;; Don't allow suspending if any of the frames are NS frames. + (if (memq 'ns (mapcar 'window-system (frame-list))) + (error "Cannot suspend Emacs while running under NS"))) + + ;; Set some options to be as Nextstep-like as possible. (setq frame-title-format t icon-title-format t) @@ -944,6 +950,10 @@ (ns-set-resource nil "ApplePressAndHoldEnabled" "NO") (x-apply-session-resources) + + ;; Don't let Emacs suspend under NS. + (add-hook 'suspend-hook 'ns-suspend-error) + (setq ns-initialized t)) ;; Any display name is OK. ------------------------------------------------------------ revno: 116242 committer: martin rudalics branch nick: trunk timestamp: Sun 2014-02-02 14:00:41 +0100 message: In Fx_create_frame of w32fns.c process frame alpha earlier. (Bug#16619) * w32fns.c (Fx_create_frame): Process frame alpha earlier. (Bug#16619) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-01 20:10:37 +0000 +++ src/ChangeLog 2014-02-02 13:00:41 +0000 @@ -1,3 +1,8 @@ +2014-02-02 Martin Rudalics + + * w32fns.c (Fx_create_frame): Process frame alpha earlier. + (Bug#16619) + 2014-02-01 Eli Zaretskii * w32fns.c (Ffile_system_info): Use WINAPI in the function === modified file 'src/w32fns.c' --- src/w32fns.c 2014-02-01 20:10:37 +0000 +++ src/w32fns.c 2014-02-02 13:00:41 +0000 @@ -4503,6 +4503,9 @@ "leftFringe", "LeftFringe", RES_TYPE_NUMBER); x_default_parameter (f, parameters, Qright_fringe, Qnil, "rightFringe", "RightFringe", RES_TYPE_NUMBER); + /* Process alpha here (Bug#16619). */ + x_default_parameter (f, parameters, Qalpha, Qnil, + "alpha", "Alpha", RES_TYPE_NUMBER); /* Init faces before x_default_parameter is called for scroll-bar parameters because that function calls x_set_scroll_bar_width, @@ -4595,8 +4598,6 @@ "cursorType", "CursorType", RES_TYPE_SYMBOL); x_default_parameter (f, parameters, Qscroll_bar_width, Qnil, "scrollBarWidth", "ScrollBarWidth", RES_TYPE_NUMBER); - x_default_parameter (f, parameters, Qalpha, Qnil, - "alpha", "Alpha", RES_TYPE_NUMBER); /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size. Change will not be effected unless different from the current ------------------------------------------------------------ revno: 116241 committer: Daniel Colascione branch nick: trunk timestamp: Sun 2014-02-02 02:25:29 -0800 message: Make loading cc-mode silent diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-02 07:51:26 +0000 +++ lisp/ChangeLog 2014-02-02 10:25:29 +0000 @@ -1,5 +1,9 @@ 2014-02-02 Daniel Colascione + * progmodes/cc-defs.el (c-find-assignment-for-mode): Make loading cc-mode silent. + +2014-02-02 Daniel Colascione + * comint.el (comint-prompt-read-only): Change doc to suggest remap keybinding. 2014-02-02 Glenn Morris === modified file 'lisp/progmodes/cc-defs.el' --- lisp/progmodes/cc-defs.el 2014-01-01 07:43:34 +0000 +++ lisp/progmodes/cc-defs.el 2014-02-02 10:25:29 +0000 @@ -2215,7 +2215,7 @@ ;;(message (concat "Loading %s to get the source " ;; "value for language constant %s") ;; file name) - (load file)) + (load file nil t)) (unless (setq assignment-entry (cdar file-entry)) ;; The load didn't fill in the source for the ------------------------------------------------------------ revno: 116240 committer: Daniel Colascione branch nick: trunk timestamp: Sat 2014-02-01 23:51:26 -0800 message: Tweak comint docstring to suggest remap bindings diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-02 03:42:20 +0000 +++ lisp/ChangeLog 2014-02-02 07:51:26 +0000 @@ -1,3 +1,7 @@ +2014-02-02 Daniel Colascione + + * comint.el (comint-prompt-read-only): Change doc to suggest remap keybinding. + 2014-02-02 Glenn Morris * register.el (register-read-with-preview, point-to-register) === modified file 'lisp/comint.el' --- lisp/comint.el 2014-01-17 16:45:45 +0000 +++ lisp/comint.el 2014-02-02 07:51:26 +0000 @@ -186,8 +186,8 @@ \(add-hook 'comint-mode-hook (lambda () - (define-key comint-mode-map \"\\C-w\" 'comint-kill-region) - (define-key comint-mode-map [C-S-backspace] + (define-key comint-mode-map [remap kill-region] 'comint-kill-region) + (define-key comint-mode-map [remap kill-whole-line] 'comint-kill-whole-line))) If you sometimes use comint-mode on text-only terminals or with `emacs -nw',