diff options
| author | Joakim Verona | 2013-01-18 00:03:35 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-01-18 00:03:35 +0100 |
| commit | 9206508b76f73ceeb87c72496d1c40cec83dac21 (patch) | |
| tree | eddf1551a4b516ad97a0f2bb1b373c300aa99afd /lisp | |
| parent | 6bb5cf7058b9268b87359c49a20acf4ca8730837 (diff) | |
| parent | 0eb8768885fab926acfae16d2fae8d39a72d8f35 (diff) | |
| download | emacs-9206508b76f73ceeb87c72496d1c40cec83dac21.tar.gz emacs-9206508b76f73ceeb87c72496d1c40cec83dac21.zip | |
auto upstream
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/autorevert.el | 24 | ||||
| -rw-r--r-- | lisp/eshell/esh-util.el | 1 |
3 files changed, 35 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 676ce21ff14..c2a58265ffd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2013-01-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * autorevert.el (auto-revert-notify-watch-descriptor): Make it | ||
| 4 | buffer local, again. This was lost with the fix on 2013-01-12. | ||
| 5 | |||
| 6 | 2013-01-17 Jürgen Hötzel <juergen@archlinux.org> | ||
| 7 | |||
| 8 | * eshell/esh-util.el (eshell-path-env): Make it buffer local, in | ||
| 9 | order to support several eshell buffers in parallel. | ||
| 10 | |||
| 11 | 2013-01-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 12 | |||
| 13 | * autorevert.el (auto-revert-use-notify): In the :set function, do | ||
| 14 | not modify `kill-buffer-hook'. | ||
| 15 | (auto-revert-notify-rm-watch): Remove | ||
| 16 | `auto-revert-notify-rm-watch' from `kill-buffer-hook'. | ||
| 17 | (auto-revert-notify-add-watch): Do not call | ||
| 18 | `auto-revert-notify-rm-watch', but add it to a buffer local | ||
| 19 | `kill-buffer-hook'. | ||
| 20 | |||
| 1 | 2013-01-16 Stefan Monnier <monnier@iro.umontreal.ca> | 21 | 2013-01-16 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 22 | ||
| 3 | * emacs-lisp/trace.el (trace--read-args): Use a closure and an honest | 23 | * emacs-lisp/trace.el (trace--read-args): Use a closure and an honest |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index c9180482cd9..1b5460ff2cf 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -273,13 +273,12 @@ through Custom only." | |||
| 273 | :type 'boolean | 273 | :type 'boolean |
| 274 | :set (lambda (variable value) | 274 | :set (lambda (variable value) |
| 275 | (set-default variable (and auto-revert-notify-enabled value)) | 275 | (set-default variable (and auto-revert-notify-enabled value)) |
| 276 | (if (symbol-value variable) | 276 | (unless (symbol-value variable) |
| 277 | (add-hook 'kill-buffer-hook 'auto-revert-notify-rm-watch) | ||
| 278 | (remove-hook 'kill-buffer-hook 'auto-revert-notify-rm-watch) | ||
| 279 | (when auto-revert-notify-enabled | 277 | (when auto-revert-notify-enabled |
| 280 | (dolist (buf (buffer-list)) | 278 | (dolist (buf (buffer-list)) |
| 281 | (with-current-buffer buf | 279 | (with-current-buffer buf |
| 282 | (auto-revert-notify-rm-watch)))))) | 280 | (when (symbol-value 'auto-revert-notify-watch-descriptor) |
| 281 | (auto-revert-notify-rm-watch))))))) | ||
| 283 | :version "24.4") | 282 | :version "24.4") |
| 284 | 283 | ||
| 285 | ;; Internal variables: | 284 | ;; Internal variables: |
| @@ -311,6 +310,7 @@ Hash key is a watch descriptor, hash value is the corresponding buffer.") | |||
| 311 | 310 | ||
| 312 | (defvar auto-revert-notify-watch-descriptor nil | 311 | (defvar auto-revert-notify-watch-descriptor nil |
| 313 | "The file watch descriptor active for the current buffer.") | 312 | "The file watch descriptor active for the current buffer.") |
| 313 | (make-variable-buffer-local 'auto-revert-notify-watch-descriptor) | ||
| 314 | (put 'auto-revert-notify-watch-descriptor 'permanent-local t) | 314 | (put 'auto-revert-notify-watch-descriptor 'permanent-local t) |
| 315 | 315 | ||
| 316 | (defvar auto-revert-notify-modified-p nil | 316 | (defvar auto-revert-notify-modified-p nil |
| @@ -472,14 +472,15 @@ will use an up-to-date value of `auto-revert-interval'" | |||
| 472 | 'inotify-rm-watch 'w32notify-rm-watch) | 472 | 'inotify-rm-watch 'w32notify-rm-watch) |
| 473 | auto-revert-notify-watch-descriptor)) | 473 | auto-revert-notify-watch-descriptor)) |
| 474 | (remhash auto-revert-notify-watch-descriptor | 474 | (remhash auto-revert-notify-watch-descriptor |
| 475 | auto-revert-notify-watch-descriptor-hash-list)) | 475 | auto-revert-notify-watch-descriptor-hash-list) |
| 476 | (remove-hook 'kill-buffer-hook 'auto-revert-notify-rm-watch)) | ||
| 476 | (setq auto-revert-notify-watch-descriptor nil | 477 | (setq auto-revert-notify-watch-descriptor nil |
| 477 | auto-revert-notify-modified-p nil)) | 478 | auto-revert-notify-modified-p nil)) |
| 478 | 479 | ||
| 479 | (defun auto-revert-notify-add-watch () | 480 | (defun auto-revert-notify-add-watch () |
| 480 | "Enable file watch for current buffer's associated file." | 481 | "Enable file watch for current buffer's associated file." |
| 481 | (when (and buffer-file-name auto-revert-use-notify) | 482 | (when (and buffer-file-name auto-revert-use-notify |
| 482 | (auto-revert-notify-rm-watch) | 483 | (not auto-revert-notify-watch-descriptor)) |
| 483 | (let ((func (if (fboundp 'inotify-add-watch) | 484 | (let ((func (if (fboundp 'inotify-add-watch) |
| 484 | 'inotify-add-watch 'w32notify-add-watch)) | 485 | 'inotify-add-watch 'w32notify-add-watch)) |
| 485 | (aspect (if (fboundp 'inotify-add-watch) | 486 | (aspect (if (fboundp 'inotify-add-watch) |
| @@ -489,9 +490,12 @@ will use an up-to-date value of `auto-revert-interval'" | |||
| 489 | (funcall | 490 | (funcall |
| 490 | func buffer-file-name aspect 'auto-revert-notify-handler))) | 491 | func buffer-file-name aspect 'auto-revert-notify-handler))) |
| 491 | (if auto-revert-notify-watch-descriptor | 492 | (if auto-revert-notify-watch-descriptor |
| 492 | (puthash auto-revert-notify-watch-descriptor | 493 | (progn |
| 493 | (current-buffer) | 494 | (puthash auto-revert-notify-watch-descriptor |
| 494 | auto-revert-notify-watch-descriptor-hash-list) | 495 | (current-buffer) |
| 496 | auto-revert-notify-watch-descriptor-hash-list) | ||
| 497 | (add-hook (make-local-variable 'kill-buffer-hook) | ||
| 498 | 'auto-revert-notify-rm-watch)) | ||
| 495 | ;; Fallback to file checks. | 499 | ;; Fallback to file checks. |
| 496 | (set (make-local-variable 'auto-revert-use-notify) nil))))) | 500 | (set (make-local-variable 'auto-revert-use-notify) nil))))) |
| 497 | 501 | ||
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 2f49a21e76c..f9b86219e9b 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -229,6 +229,7 @@ If N or M is nil, it means the end of the list." | |||
| 229 | "Content of $PATH. | 229 | "Content of $PATH. |
| 230 | It might be different from \(getenv \"PATH\"\), when | 230 | It might be different from \(getenv \"PATH\"\), when |
| 231 | `default-directory' points to a remote host.") | 231 | `default-directory' points to a remote host.") |
| 232 | (make-variable-buffer-local 'eshell-path-env) | ||
| 232 | 233 | ||
| 233 | (defun eshell-parse-colon-path (path-env) | 234 | (defun eshell-parse-colon-path (path-env) |
| 234 | "Split string with `parse-colon-path'. | 235 | "Split string with `parse-colon-path'. |