diff options
| author | Paul Eggert | 2011-02-11 21:15:47 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-02-11 21:15:47 -0800 |
| commit | 7cd330deb66863a144d7e2c36210f13d10db5245 (patch) | |
| tree | 23bfb062fc6e34d3e86fabc5e99379e82d4d6346 /lisp | |
| parent | 78998ca9cf65cc65579c8b756d35a2db9d3c8ef7 (diff) | |
| parent | af59aa6e3c661fcd547df8bc4175750f9edb20ec (diff) | |
| download | emacs-7cd330deb66863a144d7e2c36210f13d10db5245.tar.gz emacs-7cd330deb66863a144d7e2c36210f13d10db5245.zip | |
Merge from mainline.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 32 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-specs.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 9 | ||||
| -rw-r--r-- | lisp/files.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/mml2015.el | 2 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 18 | ||||
| -rw-r--r-- | lisp/simple.el | 30 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 36 |
8 files changed, 83 insertions, 52 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 392510c63d0..e8308059963 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,35 @@ | |||
| 1 | 2011-02-12 Phil Hagelberg <phil@hagelb.org> | ||
| 2 | |||
| 3 | * emacs-lisp/package.el: Allow packages to be reinstalled. | ||
| 4 | (package--write-file-no-coding): Remove EXCL arg. | ||
| 5 | (package-unpack-single): Don't use it. | ||
| 6 | |||
| 7 | 2011-02-12 Karl Pflästerer <k@rl.pflaesterer.de> (tiny change) | ||
| 8 | |||
| 9 | * vc/vc-svn.el: Adapt to Subversion change, with no .svn directory | ||
| 10 | in each sub directory. | ||
| 11 | (vc-svn-registered): Use vc-svn-root. | ||
| 12 | (vc-svn-root): New function. Make vc-svn-responsible-p an alias. | ||
| 13 | (vc-svn-repository-hostname): Use "svn info". | ||
| 14 | |||
| 15 | 2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com> | ||
| 16 | |||
| 17 | * simple.el (delete-trailing-whitespace): New optional buffer | ||
| 18 | bound parameters. | ||
| 19 | |||
| 20 | 2011-02-11 Bastien Guerry <bzg@altern.org> | ||
| 21 | |||
| 22 | * files.el (basic-save-buffer): save unmodified buffers when | ||
| 23 | the file pointed by buffer-file-name doesn't exist. | ||
| 24 | |||
| 25 | 2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com> | ||
| 26 | |||
| 27 | * net/rcirc.el (defun-rcirc-join): Accept multiple channels. | ||
| 28 | |||
| 29 | 2011-02-11 Glenn Morris <rgm@gnu.org> | ||
| 30 | |||
| 31 | * emacs-lisp/cl-specs.el (multiple-value-bind): Fix debug spec. | ||
| 32 | |||
| 1 | 2011-02-11 Juanma Barranquero <lekktu@gmail.com> | 33 | 2011-02-11 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 34 | ||
| 3 | * net/rcirc.el (rcirc-send-ctcp): Remove spurious arg to `format'. | 35 | * net/rcirc.el (rcirc-send-ctcp): Remove spurious arg to `format'. |
diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el index 7359da65e07..3556b6c1ecf 100644 --- a/lisp/emacs-lisp/cl-specs.el +++ b/lisp/emacs-lisp/cl-specs.el | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | (def-edebug-spec multiple-value-list (form)) | 67 | (def-edebug-spec multiple-value-list (form)) |
| 68 | (def-edebug-spec multiple-value-call (function-form body)) | 68 | (def-edebug-spec multiple-value-call (function-form body)) |
| 69 | (def-edebug-spec multiple-value-bind | 69 | (def-edebug-spec multiple-value-bind |
| 70 | ((&rest symbolp) form cl-declarations body)) | 70 | ((&rest symbolp) form body)) |
| 71 | (def-edebug-spec multiple-value-setq ((&rest symbolp) form)) | 71 | (def-edebug-spec multiple-value-setq ((&rest symbolp) form)) |
| 72 | (def-edebug-spec multiple-value-prog1 (form body)) | 72 | (def-edebug-spec multiple-value-prog1 (form body)) |
| 73 | 73 | ||
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index af97bb1bd21..20b6514a02a 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -577,23 +577,22 @@ Otherwise it uses an external `tar' program. | |||
| 577 | (let ((load-path (cons pkg-dir load-path))) | 577 | (let ((load-path (cons pkg-dir load-path))) |
| 578 | (byte-recompile-directory pkg-dir 0 t))))) | 578 | (byte-recompile-directory pkg-dir 0 t))))) |
| 579 | 579 | ||
| 580 | (defun package--write-file-no-coding (file-name excl) | 580 | (defun package--write-file-no-coding (file-name) |
| 581 | (let ((buffer-file-coding-system 'no-conversion)) | 581 | (let ((buffer-file-coding-system 'no-conversion)) |
| 582 | (write-region (point-min) (point-max) file-name nil nil nil excl))) | 582 | (write-region (point-min) (point-max) file-name))) |
| 583 | 583 | ||
| 584 | (defun package-unpack-single (file-name version desc requires) | 584 | (defun package-unpack-single (file-name version desc requires) |
| 585 | "Install the contents of the current buffer as a package." | 585 | "Install the contents of the current buffer as a package." |
| 586 | ;; Special case "package". | 586 | ;; Special case "package". |
| 587 | (if (string= file-name "package") | 587 | (if (string= file-name "package") |
| 588 | (package--write-file-no-coding | 588 | (package--write-file-no-coding |
| 589 | (expand-file-name (concat file-name ".el") package-user-dir) | 589 | (expand-file-name (concat file-name ".el") package-user-dir)) |
| 590 | nil) | ||
| 591 | (let* ((pkg-dir (expand-file-name (concat file-name "-" version) | 590 | (let* ((pkg-dir (expand-file-name (concat file-name "-" version) |
| 592 | package-user-dir)) | 591 | package-user-dir)) |
| 593 | (el-file (expand-file-name (concat file-name ".el") pkg-dir)) | 592 | (el-file (expand-file-name (concat file-name ".el") pkg-dir)) |
| 594 | (pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir))) | 593 | (pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir))) |
| 595 | (make-directory pkg-dir t) | 594 | (make-directory pkg-dir t) |
| 596 | (package--write-file-no-coding el-file 'excl) | 595 | (package--write-file-no-coding el-file) |
| 597 | (let ((print-level nil) | 596 | (let ((print-level nil) |
| 598 | (print-length nil)) | 597 | (print-length nil)) |
| 599 | (write-region | 598 | (write-region |
diff --git a/lisp/files.el b/lisp/files.el index 8b42eaaddb8..43b31cb0a7a 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4309,7 +4309,11 @@ Before and after saving the buffer, this function runs | |||
| 4309 | ;; In an indirect buffer, save its base buffer instead. | 4309 | ;; In an indirect buffer, save its base buffer instead. |
| 4310 | (if (buffer-base-buffer) | 4310 | (if (buffer-base-buffer) |
| 4311 | (set-buffer (buffer-base-buffer))) | 4311 | (set-buffer (buffer-base-buffer))) |
| 4312 | (if (buffer-modified-p) | 4312 | (if (or (buffer-modified-p) |
| 4313 | ;; handle the case when no modification has been made but | ||
| 4314 | ;; the file disappeared since visited | ||
| 4315 | (and buffer-file-name | ||
| 4316 | (not (file-exists-p buffer-file-name)))) | ||
| 4313 | (let ((recent-save (recent-auto-save-p)) | 4317 | (let ((recent-save (recent-auto-save-p)) |
| 4314 | setmodes) | 4318 | setmodes) |
| 4315 | ;; If buffer has no file name, ask user for one. | 4319 | ;; If buffer has no file name, ask user for one. |
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 1271168fffc..df106bb6de8 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el | |||
| @@ -116,7 +116,7 @@ Whether the passphrase is cached at all is controlled by | |||
| 116 | :type 'integer) | 116 | :type 'integer) |
| 117 | 117 | ||
| 118 | (defcustom mml2015-signers nil | 118 | (defcustom mml2015-signers nil |
| 119 | "A list of your own key ID which will be used to sign a message. | 119 | "A list of your own key ID(s) which will be used to sign a message. |
| 120 | If set, it overrides the setting of `mml2015-sign-with-sender'." | 120 | If set, it overrides the setting of `mml2015-sign-with-sender'." |
| 121 | :group 'mime-security | 121 | :group 'mime-security |
| 122 | :type '(repeat (string :tag "Key ID"))) | 122 | :type '(repeat (string :tag "Key ID"))) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index c3e4f3d6169..8657dc58bf4 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -2098,14 +2098,18 @@ activity. Only run if the buffer is not visible and | |||
| 2098 | (when (not existing-buffer) | 2098 | (when (not existing-buffer) |
| 2099 | (rcirc-cmd-whois nick)))) | 2099 | (rcirc-cmd-whois nick)))) |
| 2100 | 2100 | ||
| 2101 | (defun-rcirc-command join (channel) | 2101 | (defun-rcirc-command join (channels) |
| 2102 | "Join CHANNEL." | 2102 | "Join CHANNELS. |
| 2103 | (interactive "sJoin channel: ") | 2103 | CHANNELS is a comma- or space-separated string of channel names." |
| 2104 | (let ((buffer (rcirc-get-buffer-create process | 2104 | (interactive "sJoin channels: ") |
| 2105 | (car (split-string channel))))) | 2105 | (let* ((split-channels (split-string channels "[ ,]" t)) |
| 2106 | (rcirc-send-string process (concat "JOIN " channel)) | 2106 | (buffers (mapcar (lambda (ch) |
| 2107 | (rcirc-get-buffer-create process ch)) | ||
| 2108 | split-channels))) | ||
| 2109 | (rcirc-send-string process (concat "JOIN " channels)) | ||
| 2107 | (when (not (eq (selected-window) (minibuffer-window))) | 2110 | (when (not (eq (selected-window) (minibuffer-window))) |
| 2108 | (switch-to-buffer buffer)))) | 2111 | (dolist (b buffers) ;; order the new channel buffers in the buffer list |
| 2112 | (switch-to-buffer b))))) | ||
| 2109 | 2113 | ||
| 2110 | ;; TODO: /part #channel reason, or consider removing #channel altogether | 2114 | ;; TODO: /part #channel reason, or consider removing #channel altogether |
| 2111 | (defun-rcirc-command part (channel) | 2115 | (defun-rcirc-command part (channel) |
diff --git a/lisp/simple.el b/lisp/simple.el index 537c9a80838..f19525aba4c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -614,22 +614,30 @@ On nonblank line, delete any immediately following blank lines." | |||
| 614 | (if (looking-at "^[ \t]*\n\\'") | 614 | (if (looking-at "^[ \t]*\n\\'") |
| 615 | (delete-region (point) (point-max))))) | 615 | (delete-region (point) (point-max))))) |
| 616 | 616 | ||
| 617 | (defun delete-trailing-whitespace () | 617 | (defun delete-trailing-whitespace (&optional start end) |
| 618 | "Delete all the trailing whitespace across the current buffer. | 618 | "Delete all the trailing whitespace across the current buffer. |
| 619 | All whitespace after the last non-whitespace character in a line is deleted. | 619 | All whitespace after the last non-whitespace character in a line is deleted. |
| 620 | This respects narrowing, created by \\[narrow-to-region] and friends. | 620 | This respects narrowing, created by \\[narrow-to-region] and friends. |
| 621 | A formfeed is not considered whitespace by this function." | 621 | A formfeed is not considered whitespace by this function. |
| 622 | (interactive "*") | 622 | If the region is active, only delete whitespace within the region." |
| 623 | (interactive (progn | ||
| 624 | (barf-if-buffer-read-only) | ||
| 625 | (if (use-region-p) | ||
| 626 | (list (region-beginning) (region-end)) | ||
| 627 | (list nil nil)))) | ||
| 623 | (save-match-data | 628 | (save-match-data |
| 624 | (save-excursion | 629 | (save-excursion |
| 625 | (goto-char (point-min)) | 630 | (let ((end-marker (copy-marker (or end (point-max)))) |
| 626 | (while (re-search-forward "\\s-$" nil t) | 631 | (start (or start (point-min)))) |
| 627 | (skip-syntax-backward "-" (save-excursion (forward-line 0) (point))) | 632 | (goto-char start) |
| 628 | ;; Don't delete formfeeds, even if they are considered whitespace. | 633 | (while (re-search-forward "\\s-$" end-marker t) |
| 629 | (save-match-data | 634 | (skip-syntax-backward "-" (save-excursion (forward-line 0) (point))) |
| 630 | (if (looking-at ".*\f") | 635 | ;; Don't delete formfeeds, even if they are considered whitespace. |
| 631 | (goto-char (match-end 0)))) | 636 | (save-match-data |
| 632 | (delete-region (point) (match-end 0)))))) | 637 | (if (looking-at ".*\f") |
| 638 | (goto-char (match-end 0)))) | ||
| 639 | (delete-region (point) (match-end 0))) | ||
| 640 | (set-marker end-marker nil))))) | ||
| 633 | 641 | ||
| 634 | (defun newline-and-indent () | 642 | (defun newline-and-indent () |
| 635 | "Insert a newline, then indent according to major mode. | 643 | "Insert a newline, then indent according to major mode. |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index aefef50cf79..20c7689f401 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -117,17 +117,13 @@ If you want to force an empty list of arguments, use t." | |||
| 117 | ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) | 117 | ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) |
| 118 | ;;;###autoload "_svn") | 118 | ;;;###autoload "_svn") |
| 119 | ;;;###autoload (t ".svn")))) | 119 | ;;;###autoload (t ".svn")))) |
| 120 | ;;;###autoload (when (file-readable-p (expand-file-name | 120 | ;;;###autoload (when (vc-find-root f admin-dir) |
| 121 | ;;;###autoload (concat admin-dir "/entries") | ||
| 122 | ;;;###autoload (file-name-directory f))) | ||
| 123 | ;;;###autoload (load "vc-svn") | 121 | ;;;###autoload (load "vc-svn") |
| 124 | ;;;###autoload (vc-svn-registered f)))) | 122 | ;;;###autoload (vc-svn-registered f)))) |
| 125 | 123 | ||
| 126 | (defun vc-svn-registered (file) | 124 | (defun vc-svn-registered (file) |
| 127 | "Check if FILE is SVN registered." | 125 | "Check if FILE is SVN registered." |
| 128 | (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory | 126 | (when (vc-svn-root file) |
| 129 | "/entries") | ||
| 130 | (file-name-directory file))) | ||
| 131 | (with-temp-buffer | 127 | (with-temp-buffer |
| 132 | (cd (file-name-directory file)) | 128 | (cd (file-name-directory file)) |
| 133 | (let* (process-file-side-effects | 129 | (let* (process-file-side-effects |
| @@ -275,14 +271,12 @@ Passes either `vc-svn-register-switches' or `vc-register-switches' | |||
| 275 | to the SVN command." | 271 | to the SVN command." |
| 276 | (apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register))) | 272 | (apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register))) |
| 277 | 273 | ||
| 278 | (defun vc-svn-responsible-p (file) | 274 | (defun vc-svn-root (file) |
| 279 | "Return non-nil if SVN thinks it is responsible for FILE." | 275 | (vc-find-root file vc-svn-admin-directory)) |
| 280 | (file-directory-p (expand-file-name vc-svn-admin-directory | ||
| 281 | (if (file-directory-p file) | ||
| 282 | file | ||
| 283 | (file-name-directory file))))) | ||
| 284 | 276 | ||
| 285 | (defalias 'vc-svn-could-register 'vc-svn-responsible-p | 277 | (defalias 'vc-svn-responsible-p 'vc-svn-root) |
| 278 | |||
| 279 | (defalias 'vc-svn-could-register 'vc-svn-root | ||
| 286 | "Return non-nil if FILE could be registered in SVN. | 280 | "Return non-nil if FILE could be registered in SVN. |
| 287 | This is only possible if SVN is responsible for FILE's directory.") | 281 | This is only possible if SVN is responsible for FILE's directory.") |
| 288 | 282 | ||
| @@ -594,20 +588,10 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." | |||
| 594 | 588 | ||
| 595 | (defun vc-svn-repository-hostname (dirname) | 589 | (defun vc-svn-repository-hostname (dirname) |
| 596 | (with-temp-buffer | 590 | (with-temp-buffer |
| 597 | (let ((coding-system-for-read | 591 | (let (process-file-side-effects) |
| 598 | (or file-name-coding-system | 592 | (vc-svn-command t t dirname "info" "--xml")) |
| 599 | default-file-name-coding-system))) | ||
| 600 | (vc-insert-file (expand-file-name (concat vc-svn-admin-directory | ||
| 601 | "/entries") | ||
| 602 | dirname))) | ||
| 603 | (goto-char (point-min)) | 593 | (goto-char (point-min)) |
| 604 | (when (re-search-forward | 594 | (when (re-search-forward "<url>\\(.*\\)</url>" nil t) |
| 605 | ;; Old `svn' used name="svn:this_dir", newer use just name="". | ||
| 606 | (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" | ||
| 607 | "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" | ||
| 608 | "url=\"\\(?1:[^\"]+\\)\"" | ||
| 609 | ;; Yet newer ones don't use XML any more. | ||
| 610 | "\\|^\ndir\n[0-9]+\n\\(?1:.*\\)") nil t) | ||
| 611 | ;; This is not a hostname but a URL. This may actually be considered | 595 | ;; This is not a hostname but a URL. This may actually be considered |
| 612 | ;; as a feature since it allows vc-svn-stay-local to specify different | 596 | ;; as a feature since it allows vc-svn-stay-local to specify different |
| 613 | ;; behavior for different modules on the same server. | 597 | ;; behavior for different modules on the same server. |