diff options
| author | Joakim Verona | 2013-09-16 08:27:23 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-09-16 08:27:23 +0200 |
| commit | df15e4f6391d475acf15dcb512a28eed9964caac (patch) | |
| tree | a1b8b76d585bb6168da097b4ce1b35be3fe8b1e6 /lisp | |
| parent | 2b483f0f59ff7f125dfbe490e42eb84c238ac971 (diff) | |
| parent | 578c21bc0316661f211dd73a9eb65c8213bd372f (diff) | |
| download | emacs-df15e4f6391d475acf15dcb512a28eed9964caac.tar.gz emacs-df15e4f6391d475acf15dcb512a28eed9964caac.zip | |
merge from trunk
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 24 | ||||
| -rw-r--r-- | lisp/dired.el | 2 | ||||
| -rw-r--r-- | lisp/erc/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-unix.el | 25 | ||||
| -rw-r--r-- | lisp/eshell/esh-cmd.el | 6 | ||||
| -rw-r--r-- | lisp/eshell/esh-var.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 2 | ||||
| -rw-r--r-- | lisp/window.el | 110 |
9 files changed, 112 insertions, 71 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba3de9f4305..44a81ee32fc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2013-09-15 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-operator-re): Consider line | ||
| 4 | continuation character an operator, as far as indentation is | ||
| 5 | concerned (Bug#15369). | ||
| 6 | |||
| 7 | 2013-09-15 Martin Rudalics <rudalics@gmx.at> | ||
| 8 | |||
| 9 | * window.el (window--state-put-2): Don't process buffer state | ||
| 10 | when buffer doesn't exist any more (Bug#15382). | ||
| 11 | |||
| 12 | 2013-09-15 Glenn Morris <rgm@gnu.org> | ||
| 13 | |||
| 14 | * eshell/em-unix.el (eshell/rm): | ||
| 15 | Make -f ignore missing files. (Bug#15373) | ||
| 16 | |||
| 17 | * eshell/esh-cmd.el (eshell--local-vars): New variable. (Bug#15372) | ||
| 18 | (eshell-rewrite-for-command): Add for loop vars to eshell--local-vars. | ||
| 19 | * eshell/esh-var.el (eshell-get-variable): Respect eshell--local-vars. | ||
| 20 | |||
| 21 | 2013-09-14 Glenn Morris <rgm@gnu.org> | ||
| 22 | |||
| 23 | * eshell/esh-var.el (eshell-variable-aliases-list): Fix doc typo. | ||
| 24 | |||
| 1 | 2013-09-13 Glenn Morris <rgm@gnu.org> | 25 | 2013-09-13 Glenn Morris <rgm@gnu.org> |
| 2 | 26 | ||
| 3 | * dired-x.el (dired-guess-shell-alist-user): Doc fix. | 27 | * dired-x.el (dired-guess-shell-alist-user): Doc fix. |
diff --git a/lisp/dired.el b/lisp/dired.el index 345e8d57113..27327352afb 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -4352,7 +4352,7 @@ instead. | |||
| 4352 | 4352 | ||
| 4353 | ;;;*** | 4353 | ;;;*** |
| 4354 | 4354 | ||
| 4355 | ;;;### (autoloads nil "dired-x" "dired-x.el" "11fd4a8afa32507cc32d4a04d852587f") | 4355 | ;;;### (autoloads nil "dired-x" "dired-x.el" "732d08c173295dd14a0736fa222f532a") |
| 4356 | ;;; Generated autoloads from dired-x.el | 4356 | ;;; Generated autoloads from dired-x.el |
| 4357 | 4357 | ||
| 4358 | (autoload 'dired-jump "dired-x" "\ | 4358 | (autoload 'dired-jump "dired-x" "\ |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 70cab5af319..2c10f7fef22 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-09-14 Vivek Dasmohapatra <vivek@etla.org> | ||
| 2 | |||
| 3 | * erc.el (erc-update-mode-line-buffer): | ||
| 4 | Handle absent topic. (Bug#15377) | ||
| 5 | |||
| 1 | 2013-09-13 Glenn Morris <rgm@gnu.org> | 6 | 2013-09-13 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * erc-desktop-notifications.el (dbus-debug): Declare. | 8 | * erc-desktop-notifications.el (dbus-debug): Declare. |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 0bfd21d6c3a..771b7016bcd 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -6189,7 +6189,7 @@ if `erc-away' is non-nil." | |||
| 6189 | ?m (erc-format-channel-modes) | 6189 | ?m (erc-format-channel-modes) |
| 6190 | ?n (or (erc-current-nick) "") | 6190 | ?n (or (erc-current-nick) "") |
| 6191 | ?N (erc-format-network) | 6191 | ?N (erc-format-network) |
| 6192 | ?o (erc-controls-strip erc-channel-topic) | 6192 | ?o (or (erc-controls-strip erc-channel-topic) "") |
| 6193 | ?p (erc-port-to-string erc-session-port) | 6193 | ?p (erc-port-to-string erc-session-port) |
| 6194 | ?s (erc-format-target-and/or-server) | 6194 | ?s (erc-format-target-and/or-server) |
| 6195 | ?S (erc-format-target-and/or-network) | 6195 | ?S (erc-format-target-and/or-network) |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 52d2b4d2a2d..5792fe17506 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -284,18 +284,21 @@ Remove (unlink) the FILE(s).") | |||
| 284 | entry))))) | 284 | entry))))) |
| 285 | (eshell-funcalln 'unintern entry))) | 285 | (eshell-funcalln 'unintern entry))) |
| 286 | ((stringp entry) | 286 | ((stringp entry) |
| 287 | (if (and (file-directory-p entry) | 287 | ;; -f should silently ignore missing files (bug#15373). |
| 288 | (not (file-symlink-p entry))) | 288 | (unless (and force-removal |
| 289 | (if (or em-recursive | 289 | (not (file-exists-p entry))) |
| 290 | eshell-rm-removes-directories) | 290 | (if (and (file-directory-p entry) |
| 291 | (if (or em-preview | 291 | (not (file-symlink-p entry))) |
| 292 | (not em-interactive) | 292 | (if (or em-recursive |
| 293 | (y-or-n-p | 293 | eshell-rm-removes-directories) |
| 294 | (format "rm: descend into directory `%s'? " | 294 | (if (or em-preview |
| 295 | entry))) | 295 | (not em-interactive) |
| 296 | (y-or-n-p | ||
| 297 | (format "rm: descend into directory `%s'? " | ||
| 298 | entry))) | ||
| 296 | (eshell-remove-entries nil (list entry) t)) | 299 | (eshell-remove-entries nil (list entry) t)) |
| 297 | (eshell-error (format "rm: %s: is a directory\n" entry))) | 300 | (eshell-error (format "rm: %s: is a directory\n" entry))) |
| 298 | (eshell-remove-entries nil (list entry) t))))) | 301 | (eshell-remove-entries nil (list entry) t)))))) |
| 299 | (setq args (cdr args))) | 302 | (setq args (cdr args))) |
| 300 | nil)) | 303 | nil)) |
| 301 | 304 | ||
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index cc4fdd15bda..75e0e1d27c8 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -473,6 +473,8 @@ the second is ignored." | |||
| 473 | arg)) | 473 | arg)) |
| 474 | 474 | ||
| 475 | (defvar eshell-last-command-status) ;Define in esh-io.el. | 475 | (defvar eshell-last-command-status) ;Define in esh-io.el. |
| 476 | (defvar eshell--local-vars nil | ||
| 477 | "List of locally bound vars that should take precedence over env-vars.") | ||
| 476 | 478 | ||
| 477 | (defun eshell-rewrite-for-command (terms) | 479 | (defun eshell-rewrite-for-command (terms) |
| 478 | "Rewrite a `for' command into its equivalent Eshell command form. | 480 | "Rewrite a `for' command into its equivalent Eshell command form. |
| @@ -495,7 +497,9 @@ implemented via rewriting, rather than as a function." | |||
| 495 | (eshell-command-body '(nil)) | 497 | (eshell-command-body '(nil)) |
| 496 | (eshell-test-body '(nil))) | 498 | (eshell-test-body '(nil))) |
| 497 | (while (car for-items) | 499 | (while (car for-items) |
| 498 | (let ((,(intern (cadr terms)) (car for-items))) | 500 | (let ((,(intern (cadr terms)) (car for-items)) |
| 501 | (eshell--local-vars (cons ',(intern (cadr terms)) | ||
| 502 | eshell--local-vars))) | ||
| 499 | (eshell-protect | 503 | (eshell-protect |
| 500 | ,(eshell-invokify-arg body t))) | 504 | ,(eshell-invokify-arg body t))) |
| 501 | (setcar for-items (cadr for-items)) | 505 | (setcar for-items (cadr for-items)) |
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index f68b65dfd46..3121dadace2 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el | |||
| @@ -184,9 +184,9 @@ if they are quoted with a backslash." | |||
| 184 | indices))))) | 184 | indices))))) |
| 185 | "This list provides aliasing for variable references. | 185 | "This list provides aliasing for variable references. |
| 186 | It is very similar in concept to what `eshell-user-aliases-list' does | 186 | It is very similar in concept to what `eshell-user-aliases-list' does |
| 187 | for commands. Each member of this defines defines the name of a | 187 | for commands. Each member of this defines the name of a command, |
| 188 | command, and the Lisp value to return for that variable if it is | 188 | and the Lisp value to return for that variable if it is accessed |
| 189 | accessed via the syntax '$NAME'. | 189 | via the syntax '$NAME'. |
| 190 | 190 | ||
| 191 | If the value is a function, that function will be called with two | 191 | If the value is a function, that function will be called with two |
| 192 | arguments: the list of the indices that was used in the reference, and | 192 | arguments: the list of the indices that was used in the reference, and |
| @@ -502,6 +502,7 @@ Possible options are: | |||
| 502 | (let ((sym (intern-soft var))) | 502 | (let ((sym (intern-soft var))) |
| 503 | (if (and sym (boundp sym) | 503 | (if (and sym (boundp sym) |
| 504 | (or eshell-prefer-lisp-variables | 504 | (or eshell-prefer-lisp-variables |
| 505 | (memq sym eshell--local-vars) ; bug#15372 | ||
| 505 | (not (getenv var)))) | 506 | (not (getenv var)))) |
| 506 | (symbol-value sym) | 507 | (symbol-value sym) |
| 507 | (getenv var)))) | 508 | (getenv var)))) |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 902616e3023..95206c15390 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -132,7 +132,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 132 | ruby-block-end-re "\\|}\\|\\]\\)") | 132 | ruby-block-end-re "\\|}\\|\\]\\)") |
| 133 | "Regexp to match where the indentation gets shallower.") | 133 | "Regexp to match where the indentation gets shallower.") |
| 134 | 134 | ||
| 135 | (defconst ruby-operator-re "[-,.+*/%&|^~=<>:]" | 135 | (defconst ruby-operator-re "[-,.+*/%&|^~=<>:]\\|\\\\$" |
| 136 | "Regexp to match operators.") | 136 | "Regexp to match operators.") |
| 137 | 137 | ||
| 138 | (defconst ruby-symbol-chars "a-zA-Z0-9_" | 138 | (defconst ruby-symbol-chars "a-zA-Z0-9_" |
diff --git a/lisp/window.el b/lisp/window.el index a111b3cb5b4..14e9f6bc128 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -4464,62 +4464,66 @@ value can be also stored on disk and read back in a new session." | |||
| 4464 | (set-window-parameter window (car parameter) (cdr parameter)))) | 4464 | (set-window-parameter window (car parameter) (cdr parameter)))) |
| 4465 | ;; Process buffer related state. | 4465 | ;; Process buffer related state. |
| 4466 | (when state | 4466 | (when state |
| 4467 | ;; We don't want to raise an error in case the buffer does not | ||
| 4468 | ;; exist anymore, so we switch to a previous one and save the | ||
| 4469 | ;; window with the intention of deleting it later if possible. | ||
| 4470 | (let ((buffer (get-buffer (car state)))) | 4467 | (let ((buffer (get-buffer (car state)))) |
| 4471 | (if buffer | 4468 | (if buffer |
| 4472 | (set-window-buffer window buffer) | 4469 | (with-current-buffer buffer |
| 4470 | (set-window-buffer window buffer) | ||
| 4471 | (set-window-hscroll window (cdr (assq 'hscroll state))) | ||
| 4472 | (apply 'set-window-fringes | ||
| 4473 | (cons window (cdr (assq 'fringes state)))) | ||
| 4474 | (let ((margins (cdr (assq 'margins state)))) | ||
| 4475 | (set-window-margins window (car margins) (cdr margins))) | ||
| 4476 | (let ((scroll-bars (cdr (assq 'scroll-bars state)))) | ||
| 4477 | (set-window-scroll-bars | ||
| 4478 | window (car scroll-bars) (nth 2 scroll-bars) | ||
| 4479 | (nth 3 scroll-bars))) | ||
| 4480 | (set-window-vscroll window (cdr (assq 'vscroll state))) | ||
| 4481 | ;; Adjust vertically. | ||
| 4482 | (if (memq window-size-fixed '(t height)) | ||
| 4483 | ;; A fixed height window, try to restore the | ||
| 4484 | ;; original size. | ||
| 4485 | (let ((delta (- (cdr (assq 'total-height item)) | ||
| 4486 | (window-total-height window))) | ||
| 4487 | window-size-fixed) | ||
| 4488 | (when (window-resizable-p window delta) | ||
| 4489 | (window-resize window delta))) | ||
| 4490 | ;; Else check whether the window is not high enough. | ||
| 4491 | (let* ((min-size (window-min-size window nil ignore)) | ||
| 4492 | (delta (- min-size (window-total-size window)))) | ||
| 4493 | (when (and (> delta 0) | ||
| 4494 | (window-resizable-p window delta nil ignore)) | ||
| 4495 | (window-resize window delta nil ignore)))) | ||
| 4496 | ;; Adjust horizontally. | ||
| 4497 | (if (memq window-size-fixed '(t width)) | ||
| 4498 | ;; A fixed width window, try to restore the original | ||
| 4499 | ;; size. | ||
| 4500 | (let ((delta (- (cdr (assq 'total-width item)) | ||
| 4501 | (window-total-width window))) | ||
| 4502 | window-size-fixed) | ||
| 4503 | (when (window-resizable-p window delta) | ||
| 4504 | (window-resize window delta))) | ||
| 4505 | ;; Else check whether the window is not wide enough. | ||
| 4506 | (let* ((min-size (window-min-size window t ignore)) | ||
| 4507 | (delta (- min-size (window-total-size window t)))) | ||
| 4508 | (when (and (> delta 0) | ||
| 4509 | (window-resizable-p window delta t ignore)) | ||
| 4510 | (window-resize window delta t ignore)))) | ||
| 4511 | ;; Set dedicated status. | ||
| 4512 | (set-window-dedicated-p window (cdr (assq 'dedicated state))) | ||
| 4513 | ;; Install positions (maybe we should do this after all | ||
| 4514 | ;; windows have been created and sized). | ||
| 4515 | (ignore-errors | ||
| 4516 | (set-window-start window (cdr (assq 'start state))) | ||
| 4517 | (set-window-point window (cdr (assq 'point state)))) | ||
| 4518 | ;; Select window if it's the selected one. | ||
| 4519 | (when (cdr (assq 'selected state)) | ||
| 4520 | (select-window window))) | ||
| 4521 | ;; We don't want to raise an error in case the buffer does | ||
| 4522 | ;; not exist anymore, so we switch to a previous one and | ||
| 4523 | ;; save the window with the intention of deleting it later | ||
| 4524 | ;; if possible. | ||
| 4473 | (switch-to-prev-buffer window) | 4525 | (switch-to-prev-buffer window) |
| 4474 | (push window window-state-put-stale-windows))) | 4526 | (push window window-state-put-stale-windows))))))) |
| 4475 | (with-current-buffer (window-buffer window) | ||
| 4476 | (set-window-hscroll window (cdr (assq 'hscroll state))) | ||
| 4477 | (apply 'set-window-fringes | ||
| 4478 | (cons window (cdr (assq 'fringes state)))) | ||
| 4479 | (let ((margins (cdr (assq 'margins state)))) | ||
| 4480 | (set-window-margins window (car margins) (cdr margins))) | ||
| 4481 | (let ((scroll-bars (cdr (assq 'scroll-bars state)))) | ||
| 4482 | (set-window-scroll-bars | ||
| 4483 | window (car scroll-bars) (nth 2 scroll-bars) (nth 3 scroll-bars))) | ||
| 4484 | (set-window-vscroll window (cdr (assq 'vscroll state))) | ||
| 4485 | ;; Adjust vertically. | ||
| 4486 | (if (memq window-size-fixed '(t height)) | ||
| 4487 | ;; A fixed height window, try to restore the original size. | ||
| 4488 | (let ((delta (- (cdr (assq 'total-height item)) | ||
| 4489 | (window-total-height window))) | ||
| 4490 | window-size-fixed) | ||
| 4491 | (when (window-resizable-p window delta) | ||
| 4492 | (window-resize window delta))) | ||
| 4493 | ;; Else check whether the window is not high enough. | ||
| 4494 | (let* ((min-size (window-min-size window nil ignore)) | ||
| 4495 | (delta (- min-size (window-total-size window)))) | ||
| 4496 | (when (and (> delta 0) | ||
| 4497 | (window-resizable-p window delta nil ignore)) | ||
| 4498 | (window-resize window delta nil ignore)))) | ||
| 4499 | ;; Adjust horizontally. | ||
| 4500 | (if (memq window-size-fixed '(t width)) | ||
| 4501 | ;; A fixed width window, try to restore the original size. | ||
| 4502 | (let ((delta (- (cdr (assq 'total-width item)) | ||
| 4503 | (window-total-width window))) | ||
| 4504 | window-size-fixed) | ||
| 4505 | (when (window-resizable-p window delta) | ||
| 4506 | (window-resize window delta))) | ||
| 4507 | ;; Else check whether the window is not wide enough. | ||
| 4508 | (let* ((min-size (window-min-size window t ignore)) | ||
| 4509 | (delta (- min-size (window-total-size window t)))) | ||
| 4510 | (when (and (> delta 0) | ||
| 4511 | (window-resizable-p window delta t ignore)) | ||
| 4512 | (window-resize window delta t ignore)))) | ||
| 4513 | ;; Set dedicated status. | ||
| 4514 | (set-window-dedicated-p window (cdr (assq 'dedicated state))) | ||
| 4515 | ;; Install positions (maybe we should do this after all windows | ||
| 4516 | ;; have been created and sized). | ||
| 4517 | (ignore-errors | ||
| 4518 | (set-window-start window (cdr (assq 'start state))) | ||
| 4519 | (set-window-point window (cdr (assq 'point state)))) | ||
| 4520 | ;; Select window if it's the selected one. | ||
| 4521 | (when (cdr (assq 'selected state)) | ||
| 4522 | (select-window window))))))) | ||
| 4523 | 4527 | ||
| 4524 | (defun window-state-put (state &optional window ignore) | 4528 | (defun window-state-put (state &optional window ignore) |
| 4525 | "Put window state STATE into WINDOW. | 4529 | "Put window state STATE into WINDOW. |