diff options
| author | Deniz Dogan | 2010-12-06 13:21:42 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-06 13:21:42 -0500 |
| commit | 88b5a757a2ea698831c61bb10abc9c0abab7d31c (patch) | |
| tree | 857d4cd8336061fc25ec099a43f44de2616b92dd /lisp | |
| parent | 3c2317e89100833812a7194c0d9d39ae0f52cb33 (diff) | |
| download | emacs-88b5a757a2ea698831c61bb10abc9c0abab7d31c.tar.gz emacs-88b5a757a2ea698831c61bb10abc9c0abab7d31c.zip | |
* lisp/simple.el (just-one-space): Delete newlines for negative arg.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 51 | ||||
| -rw-r--r-- | lisp/simple.el | 11 |
2 files changed, 35 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c838c574d4..45683ec186d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2010-12-06 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2010-12-06 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * simple.el (just-one-space): Delete newlines for negative arg. | ||
| 4 | |||
| 5 | 2010-12-06 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | |||
| 3 | * ansi-color.el (ansi-color-unfontify-region): Replace by trivial def. | 7 | * ansi-color.el (ansi-color-unfontify-region): Replace by trivial def. |
| 4 | (ansi-color-filter-apply): Simplify. | 8 | (ansi-color-filter-apply): Simplify. |
| 5 | (ansi-color-apply): Use `font-lock-face' rather than `face'. | 9 | (ansi-color-apply): Use `font-lock-face' rather than `face'. |
| @@ -19,7 +23,8 @@ | |||
| 19 | 23 | ||
| 20 | * replace.el: Add "collect" feature to occur. | 24 | * replace.el: Add "collect" feature to occur. |
| 21 | (occur-collect-regexp-history): New var. | 25 | (occur-collect-regexp-history): New var. |
| 22 | (occur-read-primary-args): Return a replace string for nlines, if needed. | 26 | (occur-read-primary-args): Return a replace string for nlines, |
| 27 | if needed. | ||
| 23 | (occur): Extend the meaning of nlines. | 28 | (occur): Extend the meaning of nlines. |
| 24 | 29 | ||
| 25 | 2010-12-04 Stefan Monnier <monnier@iro.umontreal.ca> | 30 | 2010-12-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| @@ -93,8 +98,8 @@ | |||
| 93 | * net/tramp-smb.el: Fix regexps added to `tramp-default-method-alist' | 98 | * net/tramp-smb.el: Fix regexps added to `tramp-default-method-alist' |
| 94 | and `tramp-default-user-alist', respectively. | 99 | and `tramp-default-user-alist', respectively. |
| 95 | 100 | ||
| 96 | * net/tramp-gw.el (tramp-gw-open-connection): Use | 101 | * net/tramp-gw.el (tramp-gw-open-connection): |
| 97 | `tramp-get-connection-name' and `tramp-get-connection-buffer'. | 102 | Use `tramp-get-connection-name' and `tramp-get-connection-buffer'. |
| 98 | 103 | ||
| 99 | * net/tramp-imap.el (tramp-imap-make-iht): Use just | 104 | * net/tramp-imap.el (tramp-imap-make-iht): Use just |
| 100 | `tramp-file-name-port'. | 105 | `tramp-file-name-port'. |
| @@ -694,7 +699,7 @@ | |||
| 694 | 2010-11-13 Eli Zaretskii <eliz@gnu.org> | 699 | 2010-11-13 Eli Zaretskii <eliz@gnu.org> |
| 695 | 700 | ||
| 696 | * international/characters.el (glyphless-char-display-control): | 701 | * international/characters.el (glyphless-char-display-control): |
| 697 | Renamed from glyphless-char-control; all users changed. Doc fix. | 702 | Rename from glyphless-char-control; all users changed. Doc fix. |
| 698 | Signal an error if display method is not one of the recognized | 703 | Signal an error if display method is not one of the recognized |
| 699 | symbols. | 704 | symbols. |
| 700 | 705 | ||
| @@ -4182,7 +4187,7 @@ | |||
| 4182 | 4187 | ||
| 4183 | * term/ns-win.el (x-setup-function-keys, ns-last-selected-text): | 4188 | * term/ns-win.el (x-setup-function-keys, ns-last-selected-text): |
| 4184 | x-cut-buffer-or-selection-value renamed to x-selection-value | 4189 | x-cut-buffer-or-selection-value renamed to x-selection-value |
| 4185 | (x-selection-value): Renamed from x-cut-buffer-or-selection-value. | 4190 | (x-selection-value): Rename from x-cut-buffer-or-selection-value. |
| 4186 | (x-select-text): Remove argument PUSH, update documentation. | 4191 | (x-select-text): Remove argument PUSH, update documentation. |
| 4187 | 4192 | ||
| 4188 | * emacs-lisp/cl-macs.el (x-get-cutbuffer, x-get-cut-buffer): Remove. | 4193 | * emacs-lisp/cl-macs.el (x-get-cutbuffer, x-get-cut-buffer): Remove. |
| @@ -4694,7 +4699,7 @@ | |||
| 4694 | whitespace-toggle-options (Bug#6479). Allow to use fill-column | 4699 | whitespace-toggle-options (Bug#6479). Allow to use fill-column |
| 4695 | instead of whitespace-line-column (from EmacsWiki). New version | 4700 | instead of whitespace-line-column (from EmacsWiki). New version |
| 4696 | 13.1. | 4701 | 13.1. |
| 4697 | (whitespace-style): Added new value 'face. Adjust docstring. | 4702 | (whitespace-style): Add new value 'face. Adjust docstring. |
| 4698 | (whitespace-space, whitespace-hspace, whitespace-tab): | 4703 | (whitespace-space, whitespace-hspace, whitespace-tab): |
| 4699 | Adjust foreground property face. | 4704 | Adjust foreground property face. |
| 4700 | (whitespace-line-column): Adjust docstring and type declaration. | 4705 | (whitespace-line-column): Adjust docstring and type declaration. |
| @@ -5648,9 +5653,9 @@ | |||
| 5648 | * progmodes/sql.el: Version 2.3. | 5653 | * progmodes/sql.el: Version 2.3. |
| 5649 | (sql-connection-alist): Changed keys from symbols to strings; | 5654 | (sql-connection-alist): Changed keys from symbols to strings; |
| 5650 | enhanced the widget definition. | 5655 | enhanced the widget definition. |
| 5651 | (sql-mode-menu): Added submenu to select connections. | 5656 | (sql-mode-menu): Add submenu to select connections. |
| 5652 | (sql-interactive-mode-menu): Added "Save Connection" item. | 5657 | (sql-interactive-mode-menu): Add "Save Connection" item. |
| 5653 | (sql-add-product): Fixed menu item. | 5658 | (sql-add-product): Fix menu item. |
| 5654 | (sql-get-product-feature): Improved error handling. | 5659 | (sql-get-product-feature): Improved error handling. |
| 5655 | (sql--alt-buffer-part, sql--alt-if-not-empty): Removed. | 5660 | (sql--alt-buffer-part, sql--alt-if-not-empty): Removed. |
| 5656 | (sql-make-alternate-buffer-name): Simplified. | 5661 | (sql-make-alternate-buffer-name): Simplified. |
| @@ -5701,14 +5706,14 @@ | |||
| 5701 | (sql-ms-login-params, sql-postgres-login-params) | 5706 | (sql-ms-login-params, sql-postgres-login-params) |
| 5702 | (sql-interbase-login-params, sql-db2-login-params) | 5707 | (sql-interbase-login-params, sql-db2-login-params) |
| 5703 | (sql-linter-login-params): Add `port' option. | 5708 | (sql-linter-login-params): Add `port' option. |
| 5704 | (sql-get-product-feature): Added NO-INDIRECT parameter. | 5709 | (sql-get-product-feature): Add NO-INDIRECT parameter. |
| 5705 | (sql-comint-oracle, sql-comint-sybase) | 5710 | (sql-comint-oracle, sql-comint-sybase) |
| 5706 | (sql-comint-informix, sql-comint-sqlite, sql-comint-mysql) | 5711 | (sql-comint-informix, sql-comint-sqlite, sql-comint-mysql) |
| 5707 | (sql-comint-solid, sql-comint-ingres, sql-comint-ms) | 5712 | (sql-comint-solid, sql-comint-ingres, sql-comint-ms) |
| 5708 | (sql-comint-postgres, sql-comint-interbase, sql-comint-db2) | 5713 | (sql-comint-postgres, sql-comint-interbase, sql-comint-db2) |
| 5709 | (sql-comint-linter): Renamed sql-connect-* functions to | 5714 | (sql-comint-linter): Rename sql-connect-* functions to |
| 5710 | sql-comint-*. | 5715 | sql-comint-*. |
| 5711 | (sql-product-alist, sql-mode-menu): Renamed as above and | 5716 | (sql-product-alist, sql-mode-menu): Rename as above and |
| 5712 | :sqli-connect-func to :sqli-comint-func. | 5717 | :sqli-connect-func to :sqli-comint-func. |
| 5713 | (sql-connection): New variable. | 5718 | (sql-connection): New variable. |
| 5714 | (sql-interactive-mode): Set it. | 5719 | (sql-interactive-mode): Set it. |
| @@ -10861,7 +10866,7 @@ | |||
| 10861 | 10866 | ||
| 10862 | 2009-12-25 Kenichi Handa <handa@m17n.org> | 10867 | 2009-12-25 Kenichi Handa <handa@m17n.org> |
| 10863 | 10868 | ||
| 10864 | * language/indian.el (devanagari-composable-pattern): Fixed to | 10869 | * language/indian.el (devanagari-composable-pattern): Fix to |
| 10865 | handle ZWNJ and ZWJ. Use it in composition-function-table for | 10870 | handle ZWNJ and ZWJ. Use it in composition-function-table for |
| 10866 | Devanagari. | 10871 | Devanagari. |
| 10867 | (malayalam-composable-pattern): Fix previous change. | 10872 | (malayalam-composable-pattern): Fix previous change. |
| @@ -10876,8 +10881,8 @@ | |||
| 10876 | 2009-12-18 Ulf Jasper <ulf.jasper@web.de> | 10881 | 2009-12-18 Ulf Jasper <ulf.jasper@web.de> |
| 10877 | 10882 | ||
| 10878 | * calendar/icalendar.el (icalendar--convert-tz-offset): | 10883 | * calendar/icalendar.el (icalendar--convert-tz-offset): |
| 10879 | Fixed timezone names. | 10884 | Fix timezone names. |
| 10880 | (icalendar--convert-tz-offset): Fixed the "last-day-problem". | 10885 | (icalendar--convert-tz-offset): Fix the "last-day-problem". |
| 10881 | (icalendar--add-diary-entry): Remove the trailing blank that | 10886 | (icalendar--add-diary-entry): Remove the trailing blank that |
| 10882 | diary-make-entry inserts. | 10887 | diary-make-entry inserts. |
| 10883 | 10888 | ||
| @@ -11498,7 +11503,7 @@ | |||
| 11498 | (newsticker-treeview-next-new-or-immortal-item): Doc change. | 11503 | (newsticker-treeview-next-new-or-immortal-item): Doc change. |
| 11499 | (newsticker--treeview-first-feed): Doc change. | 11504 | (newsticker--treeview-first-feed): Doc change. |
| 11500 | (newsticker-treeview-list-menu) | 11505 | (newsticker-treeview-list-menu) |
| 11501 | (newsticker-treeview-item-menu): Added menu entries. | 11506 | (newsticker-treeview-item-menu): Add menu entries. |
| 11502 | (newsticker-treeview-item-mode): New. | 11507 | (newsticker-treeview-item-mode): New. |
| 11503 | 11508 | ||
| 11504 | * net/newst-backend.el (newsticker-customize): Delete other | 11509 | * net/newst-backend.el (newsticker-customize): Delete other |
| @@ -17097,7 +17102,7 @@ | |||
| 17097 | Don't modify last-coding-system-used by accident. | 17102 | Don't modify last-coding-system-used by accident. |
| 17098 | (tramp-completion-file-name-handler): Apply the checks here, | 17103 | (tramp-completion-file-name-handler): Apply the checks here, |
| 17099 | instead during registration. | 17104 | instead during registration. |
| 17100 | (tramp-register-file-name-handlers): Renamed from | 17105 | (tramp-register-file-name-handlers): Rename from |
| 17101 | `tramp-register-file-name-handler'. Register both | 17106 | `tramp-register-file-name-handler'. Register both |
| 17102 | `tramp-file-name-handler' and `tramp-completion-file-name-handler'. | 17107 | `tramp-file-name-handler' and `tramp-completion-file-name-handler'. |
| 17103 | (tramp-register-completion-file-name-handler): Remove. (Bug#4260) | 17108 | (tramp-register-completion-file-name-handler): Remove. (Bug#4260) |
| @@ -17889,7 +17894,7 @@ | |||
| 17889 | 'update signal. Instead, update all disassembly buffers only after | 17894 | 'update signal. Instead, update all disassembly buffers only after |
| 17890 | threads list. | 17895 | threads list. |
| 17891 | (gdb): Send -target-detach when buffer is killed (Bug#3794). | 17896 | (gdb): Send -target-detach when buffer is killed (Bug#3794). |
| 17892 | (gdb-starting): Moved -data-list-register-names... | 17897 | (gdb-starting): Move -data-list-register-names... |
| 17893 | (gdb-stopped): ...here so it's sent when first thread stops. | 17898 | (gdb-stopped): ...here so it's sent when first thread stops. |
| 17894 | (gdb-registers-handler-custom): Do nothing if register names are | 17899 | (gdb-registers-handler-custom): Do nothing if register names are |
| 17895 | unknown yet. | 17900 | unknown yet. |
| @@ -18028,8 +18033,8 @@ | |||
| 18028 | 18033 | ||
| 18029 | * progmodes/gdb-mi.el (gdb-var-create-regexp): Removed. | 18034 | * progmodes/gdb-mi.el (gdb-var-create-regexp): Removed. |
| 18030 | (gdb-var-create-handler): Rewritten using JSON parser. | 18035 | (gdb-var-create-handler): Rewritten using JSON parser. |
| 18031 | (gdb-propertize-header): Moved earlier. | 18036 | (gdb-propertize-header): Move earlier. |
| 18032 | (gdb-set-header): Removed to avoid duplication. | 18037 | (gdb-set-header): Remove to avoid duplication. |
| 18033 | (gdb-thread-list-handler-custom, gdb-invalidate-disassembly): | 18038 | (gdb-thread-list-handler-custom, gdb-invalidate-disassembly): |
| 18034 | Refresh disassembly buffers only after threads list have been | 18039 | Refresh disassembly buffers only after threads list have been |
| 18035 | update. | 18040 | update. |
| @@ -18099,7 +18104,7 @@ | |||
| 18099 | (gdb-locals-handler-custom): Now prints data like in variable | 18104 | (gdb-locals-handler-custom): Now prints data like in variable |
| 18100 | declarations. | 18105 | declarations. |
| 18101 | (gdb-jump-to, gdb-file-button, gdb-insert-file-location-button): | 18106 | (gdb-jump-to, gdb-file-button, gdb-insert-file-location-button): |
| 18102 | Removed confusing buttons. | 18107 | Remove confusing buttons. |
| 18103 | (gdb-invalidate-threads): Append --frame. | 18108 | (gdb-invalidate-threads): Append --frame. |
| 18104 | (gdb-threads-mode-map, gdb-breakpoints-mode-map): TAB to switch | 18109 | (gdb-threads-mode-map, gdb-breakpoints-mode-map): TAB to switch |
| 18105 | between breakpoints/threads buffers. | 18110 | between breakpoints/threads buffers. |
| @@ -18177,7 +18182,7 @@ | |||
| 18177 | (def-gdb-auto-update-handler): New nopreserve optional argument. | 18182 | (def-gdb-auto-update-handler): New nopreserve optional argument. |
| 18178 | (gdb-stack-list-frames-custom): Print stack from top to bottom. | 18183 | (gdb-stack-list-frames-custom): Print stack from top to bottom. |
| 18179 | 18184 | ||
| 18180 | * progmodes/gdb-mi.el (gdb-pc-address): Removed unused variable. | 18185 | * progmodes/gdb-mi.el (gdb-pc-address): Remove unused variable. |
| 18181 | (gdb-threads-list, gdb-breakpoints-list): New assoc lists. | 18186 | (gdb-threads-list, gdb-breakpoints-list): New assoc lists. |
| 18182 | (gdb-parent-mode): New mode to derive other GDB modes from. | 18187 | (gdb-parent-mode): New mode to derive other GDB modes from. |
| 18183 | (gdb-display-disassembly-for-thread) | 18188 | (gdb-display-disassembly-for-thread) |
| @@ -18201,7 +18206,7 @@ | |||
| 18201 | (gdb-display-registers-for-thread, gdb-frame-stack-for-thread) | 18206 | (gdb-display-registers-for-thread, gdb-frame-stack-for-thread) |
| 18202 | (gdb-frame-locals-for-thread, gdb-frame-registers-for-thread): | 18207 | (gdb-frame-locals-for-thread, gdb-frame-registers-for-thread): |
| 18203 | New commands which show buffers bound to thread. | 18208 | New commands which show buffers bound to thread. |
| 18204 | (gdb-stack-list-locals-regexp): Removed unused regexp. | 18209 | (gdb-stack-list-locals-regexp): Remove unused regexp. |
| 18205 | 18210 | ||
| 18206 | * progmodes/gdb-mi.el (gdb-breakpoints-buffer-name) | 18211 | * progmodes/gdb-mi.el (gdb-breakpoints-buffer-name) |
| 18207 | (gdb-locals-buffer-name, gdb-registers-buffer-name) | 18212 | (gdb-locals-buffer-name, gdb-registers-buffer-name) |
diff --git a/lisp/simple.el b/lisp/simple.el index 3b9bfc0519a..7300fb78a88 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -761,10 +761,13 @@ If BACKWARD-ONLY is non-nil, only delete them before point." | |||
| 761 | (constrain-to-field nil orig-pos))))) | 761 | (constrain-to-field nil orig-pos))))) |
| 762 | 762 | ||
| 763 | (defun just-one-space (&optional n) | 763 | (defun just-one-space (&optional n) |
| 764 | "Delete all spaces and tabs around point, leaving one space (or N spaces)." | 764 | "Delete all spaces and tabs around point, leaving one space (or N spaces). |
| 765 | If N is negative, deletes carriage return and linefeed characters as well." | ||
| 765 | (interactive "*p") | 766 | (interactive "*p") |
| 766 | (let ((orig-pos (point))) | 767 | (let ((orig-pos (point)) |
| 767 | (skip-chars-backward " \t") | 768 | (skip-characters (if (< n 0) " \t\n\r" " \t")) |
| 769 | (n (abs n))) | ||
| 770 | (skip-chars-backward skip-characters) | ||
| 768 | (constrain-to-field nil orig-pos) | 771 | (constrain-to-field nil orig-pos) |
| 769 | (dotimes (i (or n 1)) | 772 | (dotimes (i (or n 1)) |
| 770 | (if (= (following-char) ?\s) | 773 | (if (= (following-char) ?\s) |
| @@ -773,7 +776,7 @@ If BACKWARD-ONLY is non-nil, only delete them before point." | |||
| 773 | (delete-region | 776 | (delete-region |
| 774 | (point) | 777 | (point) |
| 775 | (progn | 778 | (progn |
| 776 | (skip-chars-forward " \t") | 779 | (skip-chars-forward skip-characters) |
| 777 | (constrain-to-field nil orig-pos t))))) | 780 | (constrain-to-field nil orig-pos t))))) |
| 778 | 781 | ||
| 779 | (defun beginning-of-buffer (&optional arg) | 782 | (defun beginning-of-buffer (&optional arg) |