Paul Eggert
ba3189039a
Update copyright year to 2014 by running admin/update-copyright.
2014-01-01 07:43:34 +00:00
Eli Zaretskii
6aaca95125
Fix a thinko in last commit in autorevert.el.
...
lisp/autorevert.el (auto-revert-notify-add-watch): Exclude symlinks from
file notifications.
2013-12-09 19:48:01 +02:00
Michael Albinus
a1099a91df
* autorevert.el (auto-revert-notify-add-watch): Do not handle symlinked files.
2013-12-09 15:47:00 +01:00
Stefan Monnier
d3b049e601
* lisp/autorevert.el (auto-revert-notify-handler): Use `cl-dolist' since we
...
rely on cl-return.
2013-09-12 00:56:51 -04:00
Stefan Monnier
abae272cce
* lisp/autorevert.el (auto-revert-notify-handler): Explicitly ignore
...
`deleted'. Don't drop errors silently.
2013-09-04 16:56:54 -04:00
Stefan Monnier
76dc5996b4
* lisp/files.el: Use lexical-binding.
...
(dir-locals-read-from-file): Remove unused `err' variable.
(hack-dir-local-variables--warned-coding): New var.
(hack-dir-local-variables): Use it to avoid repeated warnings.
(make-backup-file-name--default-function): New function.
(make-backup-file-name-function): Use it as default.
(buffer-stale--default-function): New function.
(buffer-stale-function): Use it as default.
(revert-buffer-insert-file-contents--default-function): New function.
(revert-buffer-insert-file-contents-function): Use it as default.
(insert-directory): Avoid add-to-list.
* lisp/autorevert.el (auto-revert-handler): Simplify.
Use buffer-stale--default-function.
2013-08-01 19:18:37 -04:00
Michael Albinus
d5d3c58aac
* filenotify.el (file-notify-supported-p):
...
* net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
Remove functions.
* autorevert.el (auto-revert-use-notify):
(auto-revert-notify-add-watch):
* net/tramp.el (tramp-file-name-for-operation):
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Remove `file-notify-supported-p' entry.
2013-07-24 15:29:15 +02:00
Michael Albinus
e06ec67f56
* filenotify.el (file-notify--library): Renamed from
...
`file-notify-support'. Do not autoload. Adapt all uses.
(file-notify-supported-p): New defun.
* autorevert.el (auto-revert-use-notify): Use
`file-notify-supported-p' instead of `file-notify-support'. Adapt
docstring.
(auto-revert-notify-add-watch): Use `file-notify-supported-p'.
* net/tramp.el (tramp-file-name-for-operation):
Add `file-notify-supported-p'.
* net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
New defun.
(tramp-sh-file-name-handler-alist): Add it as handler for
`file-notify-supported-p '.
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `ignore' as handler for `file-notify-*' functions.
2013-07-18 12:03:49 +02:00
Michael Albinus
864c58ca5f
* filenotify.el: New package.
...
* autorevert.el (top): Require filenotify.el.
(auto-revert-notify-enabled): Remove. Use `file-notify-support'
instead.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): Use `file-notify-*' functions.
* subr.el (file-notify-handle-event): Move function to filenotify.el.
* net/tramp.el (tramp-file-name-for-operation): Handle
`file-notify-add-watch' and `file-notify-rm-watch'.
* net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add handler
for `file-notify-add-watch' and `file-notify-rm-watch'.
(tramp-process-sentinel): Improve trace.
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-file-notify-process-filter)
(tramp-sh-handle-file-notify-rm-watch)
(tramp-get-remote-inotifywait): New defuns.
2013-07-04 11:39:36 +02:00
Stefan Monnier
fccdc796cf
* lisp/autorevert.el (auto-revert-notify-handler): Use memq.
...
Hide assertion failure.
* lisp/skeleton.el: Use cl-lib.
(skeleton-further-elements): Use defvar-local.
(skeleton-insert): Use cl-progv.
2013-06-05 15:57:10 -04:00
Michael Albinus
c9628c79bb
* configure.ac (file-notification): New option, replaces inotify option.
...
(HAVE_W32): Remove w32notify.o.
(with_file_notification): Add checks for glib and w32. Adapt check
for inotify.
(Summary): Add entry for file notification.
* autogen/config.in: Add entries for HAVE_GFILENOTIFY,
HAVE_W32NOTIFY and USE_FILE_NOTIFY.
* lisp/autorevert.el (auto-revert-notify-enabled)
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-event-p, auto-revert-notify-event-file-name)
(auto-revert-notify-handler): Handle also gfilenotify.
* lisp/subr.el: (file-notify-handle-event): New defun. Replacing ...
(inotify-event-p, inotify-handle-event, w32notify-handle-event):
Removed.
* src/Makefile.in (NOTIFY_OBJ): New variable.
(base_obj): Replace inotify.o by $(NOTIFY_OBJ).
* src/emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
Call syms_of_gfilenotify.
* src/gfilenotify.c: New file.
* src/keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
and Qfile_w32notify.
(top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
HAVE_W32NOTIFY and USE_FILE_NOTIFY.
* src/lisp.h: Declare syms_of_gfilenotify.
* src/termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
2013-06-03 15:03:05 +02:00
Michael Albinus
5d0acd9d3b
* autorevert.el (auto-revert-notify-add-watch)
...
(auto-revert-notify-handler): Add `attrib' for the inotify case,
it indicates changes in file modification time.
2013-05-22 16:47:19 +02:00
Michael Albinus
2a417372c4
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
...
(global-auto-revert-mode): Let-bind `auto-revert-use-notify' to
nil during initialization, in order not to miss changes since the
file was opened. (Bug#14140)
2013-04-05 12:18:43 +02:00
Eli Zaretskii
a7a84eea2d
Fix bug #13725 with file notifications on MS-Windows.
...
lisp/autorevert.el (auto-revert-notify-add-watch): With 'w32notify',
add watch for the file, not its parent directory, since w32notify
sets up the watch for the directory internally.
2013-02-16 11:13:40 +02:00
Michael Albinus
382936d146
* autorevert.el (auto-revert-use-notify): Fix docstring.
2013-01-30 20:20:46 +01:00
Michael Albinus
2f52b5608c
* autorevert.el (auto-revert-use-notify): Use
...
`custom-initialize-default' for initialization. (Bug#13583)
2013-01-29 17:03:40 +01:00
Michael Albinus
629cb6ec00
* autorevert.el (auto-revert-handler): Notifications which result
...
from a saved file shall not be taken into account. (Bug#13557)
2013-01-27 11:43:33 +01:00
Michael Albinus
ef3544f6a6
* autorevert.el (auto-revert-remote-files)
...
(auto-revert-notify-exclude-dir-regexp): New defcustoms.
(auto-revert-notify-enabled, auto-revert-use-notify)
(auto-revert-notify-watch-descriptor-hash-list)
(auto-revert-notify-modified-p, auto-revert-notify-event-p)
(auto-revert-notify-event-descriptor)
(auto-revert-notify-event-action)
(auto-revert-notify-event-file-name): Doc fix.
(global-auto-revert-mode): Reorder checks.
(auto-revert-notify-rm-watch): Respect changed values of
`auto-revert-notify-watch-descriptor-hash-list'.
(auto-revert-notify-add-watch): Check for
`auto-revert-notify-exclude-dir-regexp'. Adapt filters for
`inotify-add-watch'. Watch `default-directory' instead of
`buffer-file-name'. `auto-revert-notify-watch-descriptor-hash-list'
has a changed meaning now. (Bug#13540)
(auto-revert-notify-handler): Change implementation wrt events
returning from a directory.
(auto-revert-handler): Reorder implementation for checks of remote
files.
(auto-revert-buffers): Fix parentheses error.
2013-01-25 14:15:22 +01:00
Michael Albinus
0eb8768885
* autorevert.el (auto-revert-notify-watch-descriptor): Make it
...
buffer local, again. This was lost with the fix on 2013-01-12.
2013-01-17 20:12:40 +01:00
Michael Albinus
68a08a32e3
* autorevert.el (auto-revert-use-notify): In the :set function, do
...
not modify `kill-buffer-hook'.
(auto-revert-notify-rm-watch): Remove
`auto-revert-notify-rm-watch' from `kill-buffer-hook'.
(auto-revert-notify-add-watch): Do not call
`auto-revert-notify-rm-watch', but add it to a buffer local
`kill-buffer-hook'.
2013-01-17 10:06:47 +01:00
Michael Albinus
71c661e4e6
* autorevert.el (auto-revert-notify-handler): Use `file-equal-p'.
2013-01-12 20:24:27 +01:00
Michael Albinus
2daddd9e8a
* autorevert.el (auto-revert-notify-watch-descriptor): Give it
...
`permanent-local' property.
2013-01-12 14:30:00 +01:00
Eli Zaretskii
86fbb162a4
Fix filtering of file notification events in autorevert.el.
...
lisp/autorevert.el (auto-revert-notify-handler): Fix filtering of
file notification by ACTION. For filtering by file name, compare
only the non-directory part of the file name.
2013-01-12 13:25:39 +02:00
Stefan Monnier
96c421bba7
* lisp/autorevert.el: Use cl-lib instead of cl.
2013-01-11 23:17:08 -05:00
Michael Albinus
c88be99696
Fix a scoping error.
2013-01-11 23:54:42 +01:00
Michael Albinus
65adfa202b
* autorevert.el (top): Require 'cl in order to pacify byte compiler.
...
(auto-revert-notify-rm-watch): Ignore errors.
(auto-revert-notify-add-watch): Ignore errors. Use '(modify) for
inotify, and '(size last-write-time) for w32notify. Set
buffer-local `auto-revert-use-notify' to nil when adding a file
watch fails - this is a fallback to the file modification check.
(auto-revert-notify-event-p, auto-revert-notify-event-descriptor)
(auto-revert-notify-event-action)
(auto-revert-notify-event-file-name): New defuns.
(auto-revert-notify-handler): Use them. Implement first
plausibility checks.
(auto-revert-handler): Handle also `auto-revert-tail-mode'.
2013-01-11 23:36:32 +01:00
Eli Zaretskii
10e714d51d
Fix last commit in autorevert.el.
...
lisp/autorevert.el (auto-revert-notify-rm-watch)
(auto-revert-notify-add-watch): Fix typos in w32notify function
names.
2013-01-11 11:45:54 +02:00
Michael Albinus
a778dd57d0
* autorevert.el (auto-revert-notify-enabled): Move up.
...
(auto-revert-use-notify): New defcustom.
(auto-revert-mode, global-auto-revert-mode)
(auto-revert-notify-add-watch, auto-revert-handler)
(auto-revert-buffers): Use `auto-revert-use-notify' instead of
`auto-revert-notify-enabled'.
2013-01-10 21:26:15 +01:00
Michael Albinus
ed9112575e
* autorevert.el: Add file watch support.
...
(auto-revert-notify-enabled): New defconst.
(auto-revert-notify-watch-descriptor-hash-list)
(auto-revert-notify-watch-descriptor)
(auto-revert-notify-modified-p): New defvars.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): New defuns.
(auto-revert-mode, global-auto-revert-mode): Remove file watches
when mode is disabled.
(auto-revert-handler): Check for `auto-revert-notify-modified-p'.
(auto-revert-buffers): Add file watches for active buffers.
2013-01-10 15:27:48 +01:00
Paul Eggert
ab422c4d68
Update copyright notices for 2013.
2013-01-01 09:11:05 +00:00
Stefan Monnier
f58e0fd503
Reduce use of (require 'cl).
...
* admin/bzrmerge.el: Use cl-lib.
* leim/quail/hangul.el: Don't require CL.
* leim/quail/ipa.el: Use cl-lib.
* vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el:
* vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el:
* register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el:
* msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el:
* international/quail.el, info-xref.el, imenu.el, image-mode.el:
* font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el:
* battery.el, avoid.el, abbrev.el: Use cl-lib.
* vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el:
* vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el:
* jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el:
* emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el:
* calculator.el, autorevert.el, apropos.el: Don't require CL.
* emacs-bytecomp.el (byte-recompile-directory, display-call-tree)
(byte-compile-unfold-bcf, byte-compile-check-variable):
* emacs-byte-opt.el (byte-compile-trueconstp)
(byte-compile-nilconstp):
* emacs-autoload.el (make-autoload): Use pcase.
* face-remap.el (text-scale-adjust): Simplify pcase patterns.
2012-07-10 07:51:54 -04:00
Chong Yidong
cf20dee024
Tweaks to Customize interface. Set custom-reset-button-menu to t.
...
* cus-edit.el (custom-commands, custom-reset-menu)
(Custom-reset-standard): Tweak labels.
(custom-reset-button-menu): Change default to t.
(custom-buffer-create-internal): For the custom-reset-button-menu
case, put the revert button first.
(custom-group-subtitle): New face.
(custom-group-value-create): Align docstring to a specific column.
* wid-edit.el (widget-documentation-link-add): Don't handle
indentation in this function.
(widget-documentation-string-indent-to): New function.
(widget-documentation-string-value-create): Use it.
* autorevert.el (auto-revert):
* epg-config.el (epg):
* ibuffer.el (ibuffer):
* mpc.el (mpc):
* ses.el (ses):
* eshell/eshell.el (eshell):
* net/ange-ftp.el (ange-ftp):
* progmodes/ebnf2ps.el (postscript):
* progmodes/flymake.el (flymake):
* progmodes/prolog.el (prolog):
* progmodes/verilog-mode.el (verilog-mode):
* progmodes/which-func.el (which-func):
* textmodes/picture.el (picture):
* textmodes/tildify.el (tildify):
* vc/ediff.el (ediff): Tweak defgroups to improve presentation in
customization buffers.
2012-04-22 21:58:00 +08:00
Michael Albinus
8d815e3c6a
Fix previous patch.
2012-03-11 19:02:48 +01:00
Michael Albinus
8f75469172
* autorevert.el (auto-revert-handler): Ensure, that
...
file-readable-p is applied only for local files or in
auto-revert-tail-mode.
2012-03-11 18:58:16 +01:00
Glenn Morris
acaf905b11
Add 2012 to FSF copyright years for Emacs files
2012-01-05 01:46:05 -08:00
Paul Eggert
e1dbe924b5
Spelling fixes.
2011-11-19 18:29:42 -08:00
Chong Yidong
06e21633a4
Fix minor mode docstrings for the new meaning of a nil ARG.
...
* abbrev.el (abbrev-mode):
* allout.el (allout-mode):
* autoinsert.el (auto-insert-mode):
* autoarg.el (autoarg-mode, autoarg-kp-mode):
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode):
* battery.el (display-battery-mode):
* composite.el (global-auto-composition-mode)
(auto-composition-mode):
* delsel.el (delete-selection-mode):
* desktop.el (desktop-save-mode):
* dired-x.el (dired-omit-mode):
* dirtrack.el (dirtrack-mode):
* doc-view.el (doc-view-minor-mode):
* double.el (double-mode):
* electric.el (electric-indent-mode, electric-pair-mode):
* emacs-lock.el (emacs-lock-mode):
* epa-hook.el (auto-encryption-mode):
* follow.el (follow-mode):
* font-core.el (font-lock-mode):
* frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
* help.el (temp-buffer-resize-mode):
* hilit-chg.el (highlight-changes-mode)
(highlight-changes-visible-mode):
* hi-lock.el (hi-lock-mode):
* hl-line.el (hl-line-mode, global-hl-line-mode):
* icomplete.el (icomplete-mode):
* ido.el (ido-everywhere):
* image-file.el (auto-image-file-mode):
* image-mode.el (image-minor-mode):
* iswitchb.el (iswitchb-mode):
* jka-cmpr-hook.el (auto-compression-mode):
* linum.el (linum-mode):
* longlines.el (longlines-mode):
* master.el (master-mode):
* mb-depth.el (minibuffer-depth-indicate-mode):
* menu-bar.el (menu-bar-mode):
* minibuf-eldef.el (minibuffer-electric-default-mode):
* mouse-sel.el (mouse-sel-mode):
* msb.el (msb-mode):
* mwheel.el (mouse-wheel-mode):
* outline.el (outline-minor-mode):
* paren.el (show-paren-mode):
* recentf.el (recentf-mode):
* reveal.el (reveal-mode, global-reveal-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* ruler-mode.el (ruler-mode):
* savehist.el (savehist-mode):
* scroll-all.el (scroll-all-mode):
* scroll-bar.el (scroll-bar-mode):
* server.el (server-mode):
* shell.el (shell-dirtrack-mode):
* simple.el (auto-fill-mode, transient-mark-mode)
(visual-line-mode, overwrite-mode, binary-overwrite-mode)
(line-number-mode, column-number-mode, size-indication-mode)
(auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
* strokes.el (strokes-mode):
* time.el (display-time-mode):
* t-mouse.el (gpm-mouse-mode):
* tool-bar.el (tool-bar-mode):
* tooltip.el (tooltip-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* view.el (view-mode):
* whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.
* emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
autogenerated docstring.
2011-10-19 08:54:24 -04:00
Juanma Barranquero
06641a4768
lisp/autorevert.el: Use `remote-file-name-inhibit-cache'.
...
* autorevert.el (auto-revert-handler):
Bind `remote-file-name-inhibit-cache', not `tramp-cache-inhibit-cache',
which was removed in 2010-10-02T13:21:43Z!michael.albinus@gmx.de.
Don't quote lambda.
2011-04-13 16:27:41 +02:00
Glenn Morris
18cfb5a1ea
autorevert.el trivia.
...
* lisp/autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-ignore-buffer): Remove leading "*" from docs.
It makes zero sense to use it with these variables.
2011-02-19 16:09:28 -08:00
Glenn Morris
73b0cd5003
Convert consecutive FSF copyright years to ranges.
2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0
Nuke arch-tags.
2011-01-15 15:16:57 -08:00
Glenn Morris
5df4f04cd3
Add 2011 to FSF/AIST copyright years.
2011-01-02 15:50:46 -08:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Michael Albinus
3eedbc8523
* autorevert.el (auto-revert-handler): Allow
...
`auto-revert-tail-mode' for remote files.
2009-08-02 17:21:16 +00:00
Glenn Morris
fc2f6a2608
(global-auto-revert-non-file-buffers, global-auto-revert-mode): Doc fixes.
2009-06-28 00:52:23 +00:00
Glenn Morris
ae940284fa
Add 2009 to copyright years.
2009-01-05 03:18:22 +00:00
Glenn Morris
eb3fa2cfcf
Switch to recommended form of GPLv3 permissions notice.
2008-05-06 08:06:51 +00:00
Stefan Monnier
aa657fbff9
(auto-revert-buffers): Use buffer-live-p.
2008-03-26 02:38:15 +00:00
Miles Bader
59ce725a3b
Merge from emacs--rel--22
...
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
409cc4a3ea
Add 2008 to copyright years.
2008-01-07 02:45:14 +00:00