]> code.delx.au - gnu-emacs/log
gnu-emacs
8 years agoMerge branch 'scratch/kqueue' of git.sv.gnu.org:/srv/git/emacs into scratch/kqueue origin/scratch/kqueue
Michael Albinus [Wed, 25 Nov 2015 14:08:05 +0000 (15:08 +0100)]
Merge branch 'scratch/kqueue' of git.sv.gnu.org:/srv/git/emacs into scratch/kqueue

8 years agoSome final fixes in file notification before merging with master
Michael Albinus [Wed, 25 Nov 2015 14:00:06 +0000 (15:00 +0100)]
Some final fixes in file notification before merging with master

* lisp/filenotify.el (file-notify--rm-descriptor): Remove WHAT arg.
(file-notify-callback): Improve check for `stopped' event.  Call
`file-notify-rm-watch' rather than `file-notify--rm-descriptor'.
(file-notify-add-watch): In case FILE is not a directory, call the
file monitor for the kqueue backend.  Otherwise, call the
directory monitor for the upper directory.

* src/inotify.c (inotifyevent_to_event): Extract file name from
watch_object if the event doesn't provide it.
(Finotify_add_watch): Add file name to watch_object.

* test/automated/file-notify-tests.el (file-notify--test-timeout):
Use different timeouts for different libraries.
(file-notify--test-with-events): Suppress lock files.  Flush
outstanding events before running the body.
(file-notify-test02-events, file-notify-test04-file-validity): Do
not skip cygwin tests.  Add additional test for file creation.
Adapt expected result for different backends.
(file-notify-test03-autorevert): Some of the tests don't work for
w32notify.
(file-notify-test06-many-events): Rename into both directions.

8 years agoRework file notifications, kqueue has problems with directory monitors
Michael Albinus [Fri, 20 Nov 2015 18:06:42 +0000 (18:06 +0000)]
Rework file notifications, kqueue has problems with directory monitors

* lisp/filenotify.el (file-notify-add-watch): Call the native
add-watch function on the file, not on the dir.

* src/kqueue.c (kqueue_compare_dir_list): Make also bookkeeping
about already deleted entries.

* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files): Do not call "cp -f"
since this deletes the target file first.

* test/automated/file-notify-tests.el (file-notify--test-event-test):
Make stronger checks.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test06-many-events): Ler rename work in both directions.

8 years agoContinie with pending events
Michael Albinus [Thu, 19 Nov 2015 18:49:33 +0000 (18:49 +0000)]
Continie with pending events

* src/kqueue.c (pending_events): Remove global variable.
(kqueue_compare_dir_list): Create `write' event for not used
pending events.
(globals_of_kqueue): Remove initialization of pending_events.

8 years agoImprove loops in file-notify-test06-many-events
Michael Albinus [Thu, 19 Nov 2015 15:56:28 +0000 (16:56 +0100)]
Improve loops in file-notify-test06-many-events

* test/automated/file-notify-tests.el (file-notify-test06-many-events):
Use `read-event' pauses for the `write-file' loops; otherwise
events are lost in inotify and gfilenotify cases.

8 years agoHandle more complex rename operation in kqueue
Michael Albinus [Thu, 19 Nov 2015 09:58:08 +0000 (09:58 +0000)]
Handle more complex rename operation in kqueue

* src/kqueue.c (pending_events): New variable.
(kqueue_compare_dir_list): Handle more complex rename operation.
(globals_of_kqueue): Initialize pending_events.

* test/automated/file-notify-tests.el (file-notify-test06-many-events):
Adapt expected events in the `rename-file' case.
(file-notify-test06-many-events-remote): Declare.

8 years agoNew test with a larger number of events.
Wolfgang Jenkner [Wed, 18 Nov 2015 18:24:27 +0000 (19:24 +0100)]
New test with a larger number of events.

* test/automated/file-notify-tests.el (file-notify--test-with-events):
Make timeout heuristically depend on the number of events.

(file-notify-test06-many-events): Use it for new test.

8 years agoFurther fixes for kqueue.
Michael Albinus [Wed, 18 Nov 2015 13:47:25 +0000 (13:47 +0000)]
Further fixes for kqueue.

* lisp/filenotify.el (file-notify-callback): Raise also event if
directory name matches.
(file-notify-add-watch): Add `create' to the flags for `kqueue'.

* src/kqueue.c (kqueue_generate_event): Use watch_object as
argument instead of ident.  Remove callback argument.  Adapt
callees.  Check actions whether they are monitored flags.

* test/automated/file-notify-tests.el (file-notify--test-library):
New defun.
(file-notify-test00-availability, file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Use it.
(file-notify-test02-events, file-notify-test04-file-validity): Add
`read-event' calls between different file actions, in order to
give the backends a chance to rais an event.  Needed especially
for kqueue.  In case of deleting a directory, there are two
`deleted' events.

8 years agoCode cleanup of kqueue.c
Michael Albinus [Tue, 17 Nov 2015 15:46:29 +0000 (15:46 +0000)]
Code cleanup of kqueue.c

* src/kqueue.c (kqueue_directory_listing): Skip "." and "..".
(kqueue_compare_dir_list): Do not loop when calling
directory_files_internal.  Remove checks for "." and "..", this is
done in kqueue_directory_listing now.
(Fkqueue_add_watch): Check for proper emacs_open flags.

8 years agoDoc changes for kqueue
Michael Albinus [Mon, 16 Nov 2015 13:43:14 +0000 (14:43 +0100)]
Doc changes for kqueue

* doc/lispref/os.texi (File Notifications): Add kqueue as backend.
Fix some glitches in the example.

8 years agoFinish implementation in kqueue.c
Michael Albinus [Mon, 16 Nov 2015 09:47:26 +0000 (09:47 +0000)]
Finish implementation in kqueue.c

* src/kqueue.c (kqueue_directory_listing, kqueue_callback):
Simplify access to list.
(kqueue_compare_dir_list): Simplify access to list.  Raise
`delete' event if directory does not exist any longer.  Otherwise,
wait until directory contents has changed.  Fix error in check.

8 years ago* lisp/filenotify.el (file-notify-add-watch): Fix thinko.
Michael Albinus [Mon, 16 Nov 2015 07:20:22 +0000 (08:20 +0100)]
* lisp/filenotify.el (file-notify-add-watch): Fix thinko.

8 years agoMore work on kqueue
Michael Albinus [Sun, 15 Nov 2015 17:45:32 +0000 (17:45 +0000)]
More work on kqueue

* lisp/filenotify.el (file-notify-callback): Handle also the
`rename' event from kqueue.
(file-notify-add-watch): Do not register an entry twice.

* src/kqueue.c (kqueue_directory_listing): New function.
(kqueue_generate_event): New argument FILE1.  Adapt callees.
(kqueue_compare_dir_list): Rewrite in order to make it more robust.

8 years agoImplement directory events
Michael Albinus [Sat, 14 Nov 2015 11:51:28 +0000 (11:51 +0000)]
Implement directory events

* lisp/filenotify.el (file-notify-handle-event)
(file-notify-callback): Remove traces.

* src/kqueue.c: Include <sys/time.h>.
(kqueue_generate_event, kqueue_compare_dir_list): New functions.
(kqueue_callback): Use them.  Call kevent() with a zero timeout.
(Fkqueue_add_watch): Adapt docstring.  Support directory events.
Compute initial directory listing.  Close file descriptor in case
of errors.
(syms_of_kqueue): Declare Qcreate.

8 years agoBuild fixes for kqueue support.
Wolfgang Jenkner [Wed, 11 Nov 2015 15:07:50 +0000 (16:07 +0100)]
Build fixes for kqueue support.

* src/kqueue.c (Fkqueue_add_watch): O_BINARY is not a POSIX open(3)
flag.

* configure.ac (HAVE_KQUEUE): There is no pkg-config module for native
kqueue on *BSD.

8 years agoContinue kqueue implementation
Michael Albinus [Wed, 11 Nov 2015 08:22:06 +0000 (09:22 +0100)]
Continue kqueue implementation

* lisp/filenotify.el (file-notify-handle-event)
(file-notify-callback): Enable trace messages.

* src/kqueue.c: Include also <sys/types.h>.
(kqueue_callback): Remove watch in case of NOTE_DELETE or NOTE_RENAME.
(Fkqueue_rm_watch, Fkqueue_valid_p): New functions.
(syms_of_kqueue): Add them.

8 years agoWork on kqueue
Michael Albinus [Mon, 9 Nov 2015 19:26:10 +0000 (20:26 +0100)]
Work on kqueue

* lisp/filenotify.el (file-notify--library)
(file-notify-descriptors, file-notify-callback)
(file-notify-add-watch, file-notify-rm-watch)
(file-notify-valid-p): Add kqueue support.

* src/keyboard.c (make_lispy_event): Check also for HAVE_KQUEUE.

8 years agoAdd kqueue support
Michael Albinus [Mon, 9 Nov 2015 09:00:56 +0000 (10:00 +0100)]
Add kqueue support

* configure.ac (--with-file-notification): Add kqueue.
(top): Remove special test for "${HAVE_NS}" and
${with_file_notification}, this is handled inside gfilenotify
tests.  Add kqueue tests.  Use NOTIFY_CFLAGS and NOTIFY_LIBS
instead of library specific variables.

* src/Makefile.in: Use NOTIFY_CFLAGS and NOTIFY_LIBS.

* src/emacs.c (main): Call globals_of_kqueue and syms_of_kqueue.

* src/kqueue.c: New file.

* src/lisp.h: Declare extern globals_of_kqueue and syms_of_kqueue.

8 years agoSome final fixes in file notification before merging with master
Michael Albinus [Wed, 25 Nov 2015 14:00:06 +0000 (15:00 +0100)]
Some final fixes in file notification before merging with master

* lisp/filenotify.el (file-notify--rm-descriptor): Remove WHAT arg.
(file-notify-callback): Improve check for `stopped' event.  Call
`file-notify-rm-watch' rather than `file-notify--rm-descriptor'.
(file-notify-add-watch): In case FILE is not a directory, call the
file monitor for the kqueue backend.  Otherwise, call the
directory monitor for the upper directory.

* src/inotify.c (inotifyevent_to_event): Extract file name from
watch_object if the event doesn't provide it.
(Finotify_add_watch): Add file name to watch_object.

* test/automated/file-notify-tests.el (file-notify--test-timeout):
Use different timeouts for different libraries.
(file-notify--test-with-events): Suppress lock files.  Flush
outstanding events before running the body.
(file-notify-test02-events, file-notify-test04-file-validity): Do
not skip cygwin tests.  Add additional test for file creation.
Adapt expected result for different backends.
(file-notify-test03-autorevert): Some of the tests don't work for
w32notify.
(file-notify-test06-many-events): Rename into both directions.

8 years agoRework file notifications, kqueue has problems with directory monitors
Michael Albinus [Fri, 20 Nov 2015 18:06:42 +0000 (18:06 +0000)]
Rework file notifications, kqueue has problems with directory monitors

* lisp/filenotify.el (file-notify-add-watch): Call the native
add-watch function on the file, not on the dir.

* src/kqueue.c (kqueue_compare_dir_list): Make also bookkeeping
about already deleted entries.

* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files): Do not call "cp -f"
since this deletes the target file first.

* test/automated/file-notify-tests.el (file-notify--test-event-test):
Make stronger checks.
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Rewrite in order to call file monitors but directory monitors.
(file-notify-test06-many-events): Ler rename work in both directions.

8 years agoContinie with pending events
Michael Albinus [Thu, 19 Nov 2015 18:49:33 +0000 (18:49 +0000)]
Continie with pending events

* src/kqueue.c (pending_events): Remove global variable.
(kqueue_compare_dir_list): Create `write' event for not used
pending events.
(globals_of_kqueue): Remove initialization of pending_events.

8 years agoImprove loops in file-notify-test06-many-events
Michael Albinus [Thu, 19 Nov 2015 15:56:28 +0000 (16:56 +0100)]
Improve loops in file-notify-test06-many-events

* test/automated/file-notify-tests.el (file-notify-test06-many-events):
Use `read-event' pauses for the `write-file' loops; otherwise
events are lost in inotify and gfilenotify cases.

8 years agoHandle more complex rename operation in kqueue
Michael Albinus [Thu, 19 Nov 2015 09:58:08 +0000 (09:58 +0000)]
Handle more complex rename operation in kqueue

* src/kqueue.c (pending_events): New variable.
(kqueue_compare_dir_list): Handle more complex rename operation.
(globals_of_kqueue): Initialize pending_events.

* test/automated/file-notify-tests.el (file-notify-test06-many-events):
Adapt expected events in the `rename-file' case.
(file-notify-test06-many-events-remote): Declare.

8 years agoNew test with a larger number of events.
Wolfgang Jenkner [Wed, 18 Nov 2015 18:24:27 +0000 (19:24 +0100)]
New test with a larger number of events.

* test/automated/file-notify-tests.el (file-notify--test-with-events):
Make timeout heuristically depend on the number of events.

(file-notify-test06-many-events): Use it for new test.

8 years agoFurther fixes for kqueue.
Michael Albinus [Wed, 18 Nov 2015 13:47:25 +0000 (13:47 +0000)]
Further fixes for kqueue.

* lisp/filenotify.el (file-notify-callback): Raise also event if
directory name matches.
(file-notify-add-watch): Add `create' to the flags for `kqueue'.

* src/kqueue.c (kqueue_generate_event): Use watch_object as
argument instead of ident.  Remove callback argument.  Adapt
callees.  Check actions whether they are monitored flags.

* test/automated/file-notify-tests.el (file-notify--test-library):
New defun.
(file-notify-test00-availability, file-notify-test02-events)
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Use it.
(file-notify-test02-events, file-notify-test04-file-validity): Add
`read-event' calls between different file actions, in order to
give the backends a chance to rais an event.  Needed especially
for kqueue.  In case of deleting a directory, there are two
`deleted' events.

8 years agoMinor fix to comment indentation and typo in last commit
João Távora [Tue, 17 Nov 2015 22:28:50 +0000 (22:28 +0000)]
Minor fix to comment indentation and typo in last commit

* linum.el (linum-update-window): Fix comment indentation and a
typo.

8 years agolinum-mode plays more nicely with other margin-setting extensions
João Távora [Tue, 17 Nov 2015 22:23:59 +0000 (22:23 +0000)]
linum-mode plays more nicely with other margin-setting extensions

linum.el will only modify the left margin if it needs to, and will
only reset the it back to 0 if it guesses that no-one has touched that
margin in the meantime.

As such, this is a more of a workaround than an actual fix, but fixes
the problems described in bug#20674 regarding the interaction with
modes such as darkroom-mode and olivetti-mode.

A similar fix was commited to nlinum.el in ELPA.git's
e7f5f549fbfb740b911fb7f33b42381ecece56d8

* linum.el (linum-delete-overlays): Restore margins more
criteriously.
(linum-update-window): Set margins more criteriously.

8 years agoCode cleanup of kqueue.c
Michael Albinus [Tue, 17 Nov 2015 15:46:29 +0000 (15:46 +0000)]
Code cleanup of kqueue.c

* src/kqueue.c (kqueue_directory_listing): Skip "." and "..".
(kqueue_compare_dir_list): Do not loop when calling
directory_files_internal.  Remove checks for "." and "..", this is
done in kqueue_directory_listing now.
(Fkqueue_add_watch): Check for proper emacs_open flags.

8 years ago* lisp/image-mode.el: Support encrypted file
Daiki Ueno [Tue, 17 Nov 2015 02:27:51 +0000 (11:27 +0900)]
* lisp/image-mode.el: Support encrypted file

(image-toggle-display-image): Read content from the buffer instead
of the file, if the buffer holds a decrypted data.  (Bug#21870)

8 years agoDoc changes for kqueue
Michael Albinus [Mon, 16 Nov 2015 13:43:14 +0000 (14:43 +0100)]
Doc changes for kqueue

* doc/lispref/os.texi (File Notifications): Add kqueue as backend.
Fix some glitches in the example.

8 years agoFinish implementation in kqueue.c
Michael Albinus [Mon, 16 Nov 2015 09:47:26 +0000 (09:47 +0000)]
Finish implementation in kqueue.c

* src/kqueue.c (kqueue_directory_listing, kqueue_callback):
Simplify access to list.
(kqueue_compare_dir_list): Simplify access to list.  Raise
`delete' event if directory does not exist any longer.  Otherwise,
wait until directory contents has changed.  Fix error in check.

8 years ago* lisp/filenotify.el (file-notify-add-watch): Fix thinko.
Michael Albinus [Mon, 16 Nov 2015 07:20:22 +0000 (08:20 +0100)]
* lisp/filenotify.el (file-notify-add-watch): Fix thinko.

8 years ago* lisp/progmodes/verilog-mode.el (verilog-save-buffer-state): Add backquote
Juanma Barranquero [Mon, 16 Nov 2015 03:32:31 +0000 (04:32 +0100)]
* lisp/progmodes/verilog-mode.el (verilog-save-buffer-state): Add backquote

8 years ago; ChangeLog.2 fixes
Juanma Barranquero [Sun, 15 Nov 2015 23:09:59 +0000 (00:09 +0100)]
; ChangeLog.2 fixes

8 years ago* lisp/emacs-lisp/package.el: Fix a decoding issue
Artur Malabarba [Sun, 15 Nov 2015 21:28:37 +0000 (21:28 +0000)]
* lisp/emacs-lisp/package.el: Fix a decoding issue

(package--with-response-buffer): Use `url-insert-buffer-contents'.
The previous code had some issues with decoding. Refactoring that
function allows us to use the decoding from url-handlers while still
treating both sync and async requests the same.

* lisp/url/url-handlers.el (url-insert-file-contents): Move some code to
`url-insert-buffer-contents'.
(url-insert-buffer-contents): New function

8 years ago* lisp/emacs-lisp/package.el: Refactor -with-work-buffer-async
Artur Malabarba [Sat, 14 Nov 2015 15:44:44 +0000 (15:44 +0000)]
* lisp/emacs-lisp/package.el: Refactor -with-work-buffer-async

(package--with-work-buffer-async): Reimplement as
`package--with-response-buffer'.
(package--with-work-buffer): Mark obsolete.
(package--with-response-buffer): New macro. This is a more self
contained and less contrived version of
`package--with-work-buffer-async'.  It uses keyword arguments,
doesn't have async on the name, doesn't fallback on
`package--with-work-buffer', and has _much_ simpler error
handling.

(package--check-signature, package--download-one-archive)
(package-install-from-archive, describe-package-1): Use it.

(package--download-and-read-archives): Let
`package--download-one-archive' take care of calling
`package--update-downloads-in-progress'.

8 years ago* lisp/progmodes/verilog-mode.el: Use with-silent-modifications
Stefan Monnier [Sun, 15 Nov 2015 19:04:30 +0000 (14:04 -0500)]
* lisp/progmodes/verilog-mode.el: Use with-silent-modifications

(verilog-save-buffer-state): Use with-silent-modifications when available.
(verilog-save-font-no-change-functions): Don't bind
before/after-change-functions if it's not needed.

8 years agoMore work on kqueue
Michael Albinus [Sun, 15 Nov 2015 17:45:32 +0000 (17:45 +0000)]
More work on kqueue

* lisp/filenotify.el (file-notify-callback): Handle also the
`rename' event from kqueue.
(file-notify-add-watch): Do not register an entry twice.

* src/kqueue.c (kqueue_directory_listing): New function.
(kqueue_generate_event): New argument FILE1.  Adapt callees.
(kqueue_compare_dir_list): Rewrite in order to make it more robust.

8 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 15 Nov 2015 11:26:33 +0000 (06:26 -0500)]
; Auto-commit of ChangeLog files.

8 years ago* CONTRIBUTE: Remove information about feature freeze.
Xue Fuqiao [Sun, 15 Nov 2015 02:05:17 +0000 (10:05 +0800)]
* CONTRIBUTE: Remove information about feature freeze.

8 years agoMerge branch 'release-process-lowercase'
Xue Fuqiao [Sun, 15 Nov 2015 01:52:05 +0000 (09:52 +0800)]
Merge branch 'release-process-lowercase'

; Rename admin/FOR-RELEASE to admin/release-process and document the
; release process

8 years agoDocument the release process
Xue Fuqiao [Sun, 15 Nov 2015 01:35:50 +0000 (09:35 +0800)]
Document the release process

* admin/notes/versioning: Add information about RC releases.
* admin/release-process: Document the release process.
* admin/authors.el (authors-ignored-files):
* admin/README: Change FOR-RELEASE to release-process.
* CONTRIBUTE:
* admin/notes/bugtracker: Don't mention FOR-RELEASE.

8 years ago* admin/release-process: Rename from admin/FOR-RELEASE.
Xue Fuqiao [Sun, 15 Nov 2015 01:32:12 +0000 (09:32 +0800)]
* admin/release-process: Rename from admin/FOR-RELEASE.

8 years agogitmerge: Fix git log command
David Engster [Sat, 14 Nov 2015 22:14:36 +0000 (23:14 +0100)]
gitmerge: Fix git log command

* admin/gitmerge.el (gitmerge-missing): Use '--left-only' since we
only want commits from the branch that is to be merged.
(gitmerge-setup-log-buffer): Use the same symmetric range as in
`gitmerge-missing'.

8 years agogitmerge: Try to detect cherry-picks
David Engster [Sat, 14 Nov 2015 16:53:10 +0000 (17:53 +0100)]
gitmerge: Try to detect cherry-picks

* admin/gitmerge.el (gitmerge-default-branch): Change to
origin/emacs-25.
(gitmerge-missing): Use symmetric difference ('...') between
branch and master so that cherry-picks can be detected.

8 years agoImplement directory events
Michael Albinus [Sat, 14 Nov 2015 11:51:28 +0000 (11:51 +0000)]
Implement directory events

* lisp/filenotify.el (file-notify-handle-event)
(file-notify-callback): Remove traces.

* src/kqueue.c: Include <sys/time.h>.
(kqueue_generate_event, kqueue_compare_dir_list): New functions.
(kqueue_callback): Use them.  Call kevent() with a zero timeout.
(Fkqueue_add_watch): Adapt docstring.  Support directory events.
Compute initial directory listing.  Close file descriptor in case
of errors.
(syms_of_kqueue): Declare Qcreate.

8 years agoIncrement Emacs version on master branch
Eli Zaretskii [Sat, 14 Nov 2015 08:38:58 +0000 (10:38 +0200)]
Increment Emacs version on master branch

* lisp/cus-edit.el (customize-changed-options-previous-release):
Increase previous version to 24.5.

* configure.ac:
* msdos/sed2v2.inp: Bump version to 25.1.50.

8 years agoMention CONTRIBUTE in README
Xue Fuqiao [Sat, 14 Nov 2015 04:49:17 +0000 (12:49 +0800)]
Mention CONTRIBUTE in README

Mention CONTRIBUTE in README, since it was moved from etc/ to root.
* etc/TODO: Remove the reference to `etc/CONTRIBUTE'.
* README: Mention CONTRIBUTE.

8 years agoUpdate verilog-mode.el to 2015-11-09-b121d60-vpo.
Wilson Snyder [Sat, 14 Nov 2015 02:17:57 +0000 (21:17 -0500)]
Update verilog-mode.el to 2015-11-09-b121d60-vpo.

* verilog-mode.el (verilog-auto, verilog-delete-auto)
(verilog-modi-cache-results, verilog-save-buffer-state)
(verilog-save-font-no-change-functions): When internally suppressing change
functions, use `inhibit-modification-hooks' and call
`after-change-funtions' to more nicely work with user hooks.  Reported by
Stefan Monnier.

(verilog-auto, verilog-delete-auto, verilog-delete-auto-buffer):
Create `verilog-delete-auto-buffer' to avoid double-calling
fontification hooks.

(verilog-restore-buffer-modified-p, verilog-auto)
(verilog-save-buffer-state): Prefer restore-buffer-modified-p over
set-buffer-modified-p. Reported by Stefan Monnier.

(verilog-diff-auto, verilog-diff-buffers-p)
(verilog-diff-ignore-regexp): Add `verilog-diff-ignore-regexp'.

(verilog-auto-inst-port, verilog-read-sub-decls-expr): Fix
AUTOINST with unpacked dimensional parameters, bug981. Reported by
by Amol Nagapurkar.

(verilog-read-decls, verilog-read-sub-decls-line): Avoid unneeded
properties inside internal structures. No functional change
intended.

8 years ago; Fix warnings
Dmitry Gutov [Sat, 14 Nov 2015 01:03:58 +0000 (03:03 +0200)]
; Fix warnings

* lisp/vc/diff-mode.el (diff-kill-applied-hunks):
Fix unused variable warnings.

8 years ago; Update xref-etags-mode for the latest change
Dmitry Gutov [Sat, 14 Nov 2015 00:40:06 +0000 (02:40 +0200)]
; Update xref-etags-mode for the latest change

8 years agoUse generic dispatch for xref backends
Dmitry Gutov [Sat, 14 Nov 2015 00:37:01 +0000 (02:37 +0200)]
Use generic dispatch for xref backends

* lisp/progmodes/xref.el (xref-backend-functions):
New variable.
(xref-find-function): Remove.
(xref-find-backend)
(xref--etags-backend): New functions.
(xref-identifier-at-point-function)
(xref-identifier-completion-table-function): Remove.
(xref-backend-definitions, xref-backend-references)
(xref-backend-apropos, xref-backend-identifier-at-point)
(xref-backend-identifier-completion-table):
New generic functions.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add
`elisp--xref-backend' to the beginning of
`xref-backend-functions', locally.  Delete references to
removed functions and vars.
(elisp-xref-find): Remove.
(elisp--xref-backend): New function.
(elisp--xref-find-references, elisp--xref-find-apropos)
(elisp--xref-identifier-completion-table):
Turn into appropriately named generic methods.

* lisp/progmodes/etags.el (etags-xref-find): Remove.
(xref-backend-identifier-completion-table)
(xref-backend-references, xref-backend-definitions)
(xref-backend-apropos): New generic methods.

8 years agoSupport rectangular regions for more commands
Juri Linkov [Fri, 13 Nov 2015 23:28:03 +0000 (01:28 +0200)]
Support rectangular regions for more commands

* lisp/simple.el (region-extract-function): Handle the arg value ‘bounds’.
(region-insert-function): New function.
(shell-command-on-region): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks.
(region-noncontiguous-p): New function.

* lisp/rect.el: Add function rectangle--insert-region
around region-insert-function.
(extract-rectangle-bounds): New function.
(rectangle--extract-region): Handle the arg value ‘bounds’.
(rectangle--insert-region): New function.

* lisp/emulation/cua-rect.el: Add function cua--insert-rectangle
around region-insert-function.
(cua--extract-rectangle-bounds): New function.
(cua--rectangle-region-extract): Handle the arg value ‘bounds’.

* lisp/replace.el (query-replace, query-replace-regexp): Add arg
‘region-noncontiguous-p’.  Use ‘use-region-p’.
(query-replace-regexp-eval, map-query-replace-regexp)
(replace-string, replace-regexp): Use ‘use-region-p’.
(keep-lines, flush-lines, how-many): Use ‘use-region-p’.
(perform-replace): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks.

* src/casefiddle.c (Fdowncase_region): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks. (Bug#19829)

8 years agoHandle multiple matches on the same line; add highlighting
Dmitry Gutov [Mon, 9 Nov 2015 03:24:23 +0000 (05:24 +0200)]
Handle multiple matches on the same line; add highlighting

* lisp/progmodes/xref.el (xref-location-marker): Interpret the
column value in characters.
(xref--collect-matches): Rename from `xref--collect-match'.
Search for all matches in the hit line.  Add `highlight' face to
the matched region in the summary.  Update both callers.

8 years agoReplace xref-match-bounds with xref-match-length
Dmitry Gutov [Sun, 8 Nov 2015 03:01:05 +0000 (05:01 +0200)]
Replace xref-match-bounds with xref-match-length

Relying on xref-location-marker to point to the beginning of the match

* lisp/progmodes/xref.el (xref-match-bounds): Remove.
(xref-match-length): Add.
(xref-make-match): Change the arguments.
(xref--match-buffer-bounds): Remove.
(xref-match-item): Store length, instead of end-column.
(xref-pulse-momentarily)
(xref--collect-match)
(xref--query-replace-1): Update accordingly.
(xref-query-replace): Ditto.  And check that the search results
are up-to-date.

8 years agoMerge from gnulib
Paul Eggert [Fri, 13 Nov 2015 20:39:13 +0000 (12:39 -0800)]
Merge from gnulib

This incorporates:
2015-11-13 xalloc-oversized: improve performance with GCC 5
* lib/xalloc-oversized.h: Copy from gnulib.

8 years agoSpruce up ftfont.c memory allocation
Paul Eggert [Fri, 13 Nov 2015 20:02:21 +0000 (12:02 -0800)]
Spruce up ftfont.c memory allocation

* src/ftfont.c (setup_otf_gstring):
Avoid O(N**2) behavior when reallocating.
(ftfont_shape_by_flt): Prefer xpalloc to xrealloc when
reallocating buffers; this simplifies the code.  Do not trust
mflt_run to leave the output areas unchanged on failure, as
this isn’t part of its interface spec.

8 years agoPort recent XCB changes to 64-bit ‘long int’
Paul Eggert [Fri, 13 Nov 2015 17:28:53 +0000 (09:28 -0800)]
Port recent XCB changes to 64-bit ‘long int’

For historical reasons, libX11 represents 32-bit values like Atoms as
‘long int’ even on platforms where ‘long int’ is 64 bits.  XCB doesn’t
do that, so adapt the recent XCB code to behave properly on 64-bit
platforms.  Also, fix what appears to be a bug in the interpretation
of xcb_get_property_value_length, at least on my Fedora platform
which is running libxcb-1.11-5.fc21.
* src/xfns.c (x_real_pos_and_offsets):
* src/xterm.c (get_current_wm_state):
xcb_get_property_value_length returns a byte count, not a word count.
For 32-bit quantities, xcb_get_property_value returns a vector
of 32-bit words, not of (possibly 64-bit) long int.

8 years ago* src/undo.c (run_undoable_change): Now static.
Paul Eggert [Fri, 13 Nov 2015 16:44:14 +0000 (08:44 -0800)]
* src/undo.c (run_undoable_change): Now static.

8 years agoRemove support for ':timeout' from w32 tray notifications
Eli Zaretskii [Fri, 13 Nov 2015 13:33:29 +0000 (15:33 +0200)]
Remove support for ':timeout' from w32 tray notifications

* src/w32fns.c (Fw32_notification_notify): Delete the code that
supports ':timeout'.
(syms_of_w32fns): Don't DEFSYM ':timeout'.  This avoids clashes
with dbusbind.c when D-Bus is compiled in.

* doc/lispref/os.texi (Desktop Notifications): Don't mention
':timeout'.

8 years ago* test/automated/simple-test.el: Add test for bug#20698 (bug#21885)
Juanma Barranquero [Fri, 13 Nov 2015 13:09:35 +0000 (14:09 +0100)]
* test/automated/simple-test.el: Add test for bug#20698 (bug#21885)

(simple-test--transpositions): New macro.
(simple-transpose-subr): New test.

8 years ago* lisp/progmodes/elisp-mode.el: Declare function `project-roots'
Juanma Barranquero [Fri, 13 Nov 2015 10:04:10 +0000 (11:04 +0100)]
* lisp/progmodes/elisp-mode.el: Declare function `project-roots'

8 years ago* src/undo.c: Small fixes for previous change
Juanma Barranquero [Fri, 13 Nov 2015 09:56:28 +0000 (10:56 +0100)]
* src/undo.c: Small fixes for previous change

(run_undoable_change): Mark void argument list.
(record_property_change): Remove unused variable `boundary'.

8 years agoAdd a few more variables to redisplay--variables
Eli Zaretskii [Fri, 13 Nov 2015 09:56:08 +0000 (11:56 +0200)]
Add a few more variables to redisplay--variables

* lisp/frame.el (redisplay--variables): Add bidi-paragraph-direction
and bidi-display-reordering to the list.

8 years ago* lisp/loadup.el: Enlarge the size of the hash table to 80000.
Eli Zaretskii [Fri, 13 Nov 2015 09:52:53 +0000 (11:52 +0200)]
* lisp/loadup.el: Enlarge the size of the hash table to 80000.

8 years agoFix point positioning after transposing with negative arg
Eli Barzilay [Fri, 13 Nov 2015 09:46:20 +0000 (11:46 +0200)]
Fix point positioning after transposing with negative arg

* lisp/simple.el (transpose-subr): When invoked with a negative
argument, move point to after the transposed text, like we do
when invoked with a positive argument.  (Bug#21885)

8 years agoFix last change in shr.el
Eli Zaretskii [Fri, 13 Nov 2015 09:23:35 +0000 (11:23 +0200)]
Fix last change in shr.el

* lisp/net/shr.el (shr--have-one-fringe-p): Rename from
have-fringes-p.  All callers changed.  Doc fix.  (Bug#21895)

8 years agoFix last change
Eli Zaretskii [Fri, 13 Nov 2015 09:07:43 +0000 (11:07 +0200)]
Fix last change

* src/w32fns.c (syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]:
Don't DEFSYM tray notification symbols if D-Bus is being used.

8 years agoAnother fix for MinGW64 and Cygwin builds due to notifications
Eli Zaretskii [Fri, 13 Nov 2015 09:02:04 +0000 (11:02 +0200)]
Another fix for MinGW64 and Cygwin builds due to notifications

* src/w32fns.c: Ifdef away tray notification code if D-Bus is
being compiled into Emacs.
(syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]: Don't defsubr
Sw32_notification_notify and Sw32_notification_close if the code
is not compiled.  Reported by Andy Moreton <andrewjmoreton@gmail.com>.

8 years agoRemove intern calls and XXX comments from Fx_export_frames
YAMAMOTO Mitsuharu [Fri, 13 Nov 2015 03:48:09 +0000 (12:48 +0900)]
Remove intern calls and XXX comments from Fx_export_frames

* src/xfns.c (Fx_export_frames): Use Qpdf, Qpng, Qpostscript, and
Qsvg instead of intern calls.  Use "postscript" instead of "ps"
for consistency with image types.  Remove XXX comments.
(syms_of_xfns) <Qpdf>: DEFSYM it.

8 years agoshr: don't invoke unbound function (Bug#21895)
Eric Hanchrow [Fri, 13 Nov 2015 01:23:37 +0000 (17:23 -0800)]
shr: don't invoke unbound function (Bug#21895)

* lisp/net/shr.el (have-fringes-p): New function.
  (shr-insert-document, shr-fill-text): Use it.

8 years ago* test/automated/keymaps-test.el: Fix test to make it repeatable
Juanma Barranquero [Thu, 12 Nov 2015 22:36:33 +0000 (23:36 +0100)]
* test/automated/keymaps-test.el: Fix test to make it repeatable

(keymap-store_in_keymap-FASTINT-on-nonchars): Reset Buffer-menu-mode-map
entry to its initial value to make the test repeatable in interactive
sessions (assuming it doesn't fail and crashes Emacs, of course).

8 years ago* test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Small fix
Artur Malabarba [Thu, 12 Nov 2015 23:32:40 +0000 (23:32 +0000)]
* test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Small fix

8 years ago: Tests for undo-auto functionality.
Phillip Lord [Thu, 12 Nov 2015 22:18:59 +0000 (22:18 +0000)]
: Tests for undo-auto functionality.

8 years ago; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change'
Phillip Lord [Thu, 12 Nov 2015 22:01:22 +0000 (22:01 +0000)]
; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change'

Conflicts:
src/cmds.c
src/keyboard.c

8 years agoThe heuristic that Emacs uses to add an `undo-boundary' has been
Phillip Lord [Thu, 6 Aug 2015 20:33:58 +0000 (21:33 +0100)]
The heuristic that Emacs uses to add an `undo-boundary' has been
reworked, as it interacts poorly with functions on `post-command-hook'
or `after-change-functions'.

* lisp/simple.el: New section added.
* src/cmds.c (remove_excessive_undo_boundaries): Now in lisp.
(self_insert_command): Calls simple.el to amalgamate.
(delete_char): Calls simple.el to amalgamate.
* src/keyboard.c (last_undo_boundary): Removed.
* src/undo.c (run_undoable_change): New function.

8 years agoBind [?\S-\ ] to previous line command in Dired-like modes.
Juri Linkov [Thu, 12 Nov 2015 20:54:01 +0000 (22:54 +0200)]
Bind [?\S-\ ] to previous line command in Dired-like modes.

* lisp/arc-mode.el (archive-mode-map):
* lisp/dired.el (dired-mode-map):
* lisp/proced.el (proced-mode-map):
* lisp/vc/vc-dir.el (vc-dir-mode-map):
Bind [?\S-\ ] to previous line command.
(Bug#20790)

8 years agoFix the MinGW64 and Cygwin-w32 builds
Eli Zaretskii [Thu, 12 Nov 2015 20:40:31 +0000 (22:40 +0200)]
Fix the MinGW64 and Cygwin-w32 builds

* src/w32fns.c (MYNOTIFYICONDATAW_V1_SIZE)
(MYNOTIFYICONDATAW_V2_SIZE, MYNOTIFYICONDATAW_V3_SIZE): Define and
use instead of the corresponding NOTIFYICONDATAW_Vn_SIZE macros,
which cause trouble with MinGW42 headers.  Ifdef away tray
notifications code for Cygwin.  Reported by Andy Moreton
<andrewjmoreton@gmail.com>.

8 years agoEnable sorting of JSON object keys when encoding
Simen Heggestøyl [Thu, 12 Nov 2015 17:30:37 +0000 (18:30 +0100)]
Enable sorting of JSON object keys when encoding

* lisp/json.el (json-encoding-object-sort-predicate): New variable for
specifying a sorting predicate for JSON objects during encoding.
(json--plist-to-alist): New utility function.
(json-encode-hash-table): Re-use `json-encode-alist' when object keys
are to be sorted.
(json-encode-alist): Sort output by
`json-encoding-object-sort-predicate, when set.
(json-encode-plist): Re-use `json-encode-alist' when object keys are
to be sorted.
(json-pretty-print-buffer-ordered): New command to pretty print the
buffer with object keys sorted alphabetically.
(json-pretty-print-ordered): New command to pretty print the region with
object keys sorted alphabetically.

* test/automated/json-tests.el (test-json-plist-to-alist)
(test-json-encode-plist, test-json-encode-hash-table)
(test-json-encode-alist-with-sort-predicate)
(test-json-encode-plist-with-sort-predicate): New tests.

* etc/NEWS: Add an entry for the new commands.

8 years ago* test/automated/keymap-tests.el: New test file
Juanma Barranquero [Thu, 12 Nov 2015 16:54:48 +0000 (17:54 +0100)]
* test/automated/keymap-tests.el: New test file

8 years agoSpeed up x_real_pos_and_offsets using XCB
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Speed up x_real_pos_and_offsets using XCB

* src/xfns.c (x_real_pos_and_offsets) [USE_XCB]: Add XCB flavors of
all X calls, and pipeline requests when possible, collecting results
later.  Eliminate use of x_catch_errors (and thus XSync) in XCB case.

8 years agoEnable use of XCB for checking window manager state
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Enable use of XCB for checking window manager state

* src/xterm.c (get_current_wm_state) [USE_XCB]: Use XCB calls instead
of XGetWindowProperty plus error-catching, since we can explicitly
check for errors in the XCB version.  This eliminates 3 XSync calls on
top of the round-trip actually fetching the information.

8 years agoDetect XCB and save a connection handle
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Detect XCB and save a connection handle

* configure.ac: If using X11, check for XCB libraries and header.
* src/Makefile.in (XCB_LIBS): Define.
(LIBX_EXTRA): Include it.

* src/xterm.h [USE_XCB]: Include X11/Xlib-xcb.h.
(struct x_display_info) [USE_XCB]: Add an XCB connection handle field.
* src/xterm.c (x_term_init) [USE_XCB]: Initialize the new field.

8 years agoReduce some data dependencies between X calls
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Reduce some data dependencies between X calls

Gains nothing in the traditional-Xlib code, but more closely aligns
with how the XCB version will work.

* src/xfns.c (x_real_pos_and_offsets): When translating coordinates,
send coordinates (0,0) to the X server and add in the real coordinates
after getting the response.  Move XGetGeometry for outer window inside
error-trapping block.  Use DPY variable more, since it's available.

8 years agoUse color cache for creating bitmap
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Use color cache for creating bitmap

* src/image.c (x_create_bitmap_from_xpm_data) [ALLOC_XPM_COLORS]: Set
attributes to use the caching color allocator.  Initialize and free
the cache.

8 years agoAdd "^" to the interactive specs of `dired-next/previous-line'
Eli Barzilay [Thu, 12 Nov 2015 08:07:38 +0000 (03:07 -0500)]
Add "^" to the interactive specs of `dired-next/previous-line'

* lisp/dired.el (dired-next-line, dired-previous-line): It makes sense
to bind these commands to the arrow keys, and that means that they work
better with a "^" in the `interactive' declaration so selection works
as expected.

8 years agoSync with soap-client repository, version 3.0.2
Thomas Fitzsimmons [Thu, 12 Nov 2015 04:43:50 +0000 (23:43 -0500)]
Sync with soap-client repository, version 3.0.2

* soap-client.el: Bump version to 3.0.2.

* soap-client.el (soap-warning): Use format, not format-message.

* soap-client.el: Add cl-lib to Package-Requires.  Require cl-lib.
(soap-validate-xs-simple-type): Use cl-labels instead of cl-flet.

* soap-client.el: Support Emacs versions that do not have
define-error.

* soap-inspect.el: Remove version header.

* soap-client.el, soap-inspect.el, jira2.el: Fix first line header
format.

8 years agoCC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start.
Alan Mackenzie [Wed, 11 Nov 2015 22:06:12 +0000 (22:06 +0000)]
CC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start.

lisp/progmodes/cc-engine.el (c-backward-single-comment, c-backward-comments)
(c-invalidate-state-cache-1, c-parse-state-1, c-guess-basic-syntax):
remove bindings of open-paren-in-column-0-is-defun-start to nil.
(c-get-fallback-scan-pos): "New" function (existed several years ago).
(c-parse-state-get-strategy): Reintroduce the 'BOD strategy, using
c-get-fallback-scan-pos.
(c-parse-state-1): Handle 'BOD strategy.

lisp/progmodes/cc-mode.el (c-before-change, c-after-change)
c-font-lock-fontify-region): remove bindings of
open-paren-in-column-0-is-defun-start to nil.

cc-mode.texi (Performance Issues, Limitations and Known Bugs): Fix mix up
between @chapter and @appendix.

8 years ago* lisp/obarray.el: Fix shadowed variables
Artur Malabarba [Wed, 11 Nov 2015 22:30:22 +0000 (22:30 +0000)]
* lisp/obarray.el: Fix shadowed variables

(obarray-map, obarray-remove, obarray-put, obarray-get):
Change OBARRAY arg to OB to avoid shadowing ‘obarray’.

8 years agoAvoid error in submitting a form with EWW
Eli Zaretskii [Wed, 11 Nov 2015 20:01:39 +0000 (22:01 +0200)]
Avoid error in submitting a form with EWW

* lisp/gnus/mm-url.el (mm-url-form-encode-xwfu): Allow argument
CHUNK to be nil.  (Bug#21881)

8 years ago; * doc/lispref/os.texi: Fix indentation of sample code.
Juanma Barranquero [Wed, 11 Nov 2015 17:42:25 +0000 (18:42 +0100)]
; * doc/lispref/os.texi: Fix indentation of sample code.

8 years agoRename seq-p and map-p to seqp and mapp
Nicolas Petton [Wed, 11 Nov 2015 17:18:32 +0000 (18:18 +0100)]
Rename seq-p and map-p to seqp and mapp

* lisp/emacs-lisp/seq.el (seqp): New name.
* lisp/emacs-lisp/map.el (mapp): New name.
* doc/lispref/sequences.texi: Update the documentation for seqp.
* test/automated/map-tests.el: Update the tests for mapp.

8 years agoRename obarray-p to obarrayp
Nicolas Petton [Wed, 11 Nov 2015 17:09:42 +0000 (18:09 +0100)]
Rename obarray-p to obarrayp

* lisp/obarray.el (obarrayp): New name.
* test/automated/obarray-tests.el: Update the tests.

8 years agoRename obarray-foreach to obarray-map
Nicolas Petton [Wed, 11 Nov 2015 16:53:41 +0000 (17:53 +0100)]
Rename obarray-foreach to obarray-map

* lisp/obarray.el (obarray-map): New name.
* test/automated/obarray-tests.el: Update the corresponding tests.

8 years agoNew file with obarray functions.
Przemysław Wojnowski [Sun, 8 Nov 2015 15:59:07 +0000 (16:59 +0100)]
New file with obarray functions.

* lisp/obarray.el: basic obarray functions extracted from abbrev.el
* test/automated/obarray-tests.el: new file

8 years agoImplement tray notifications for MS-Windows
Eli Zaretskii [Wed, 11 Nov 2015 16:29:36 +0000 (18:29 +0200)]
Implement tray notifications for MS-Windows

* src/w32fns.c (MY_NOTIFYICONDATAW): New typedef.
(NOTIFYICONDATAW_V1_SIZE, NOTIFYICONDATAW_V2_SIZE)
(NOTIFYICONDATAW_V3_SIZE, NIF_INFO, NIIF_NONE, NIIF_INFO)
(NIIF_WARNING, NIIF_ERROR, EMACS_TRAY_NOTIFICATION_ID)
(EMACS_NOTIFICATION_MSG): New macros.
(NI_Severity): New enumeration.
(get_dll_version, utf8_mbslen_lim, add_tray_notification)
(delete_tray_notification, Fw32_notification_notify)
(Fw32_notification_close): New functions.
(syms_of_w32fns): Defsubr functions exposed to Lisp.  DEFSYM
keywords used by w32-notification-notify.

* doc/lispref/os.texi (Desktop Notifications): Describe the native
w32 tray notifications.

8 years agoBuild fixes for kqueue support.
Wolfgang Jenkner [Wed, 11 Nov 2015 15:07:50 +0000 (16:07 +0100)]
Build fixes for kqueue support.

* src/kqueue.c (Fkqueue_add_watch): O_BINARY is not a POSIX open(3)
flag.

* configure.ac (HAVE_KQUEUE): There is no pkg-config module for native
kqueue on *BSD.

8 years agoContinue kqueue implementation
Michael Albinus [Wed, 11 Nov 2015 08:22:06 +0000 (09:22 +0100)]
Continue kqueue implementation

* lisp/filenotify.el (file-notify-handle-event)
(file-notify-callback): Enable trace messages.

* src/kqueue.c: Include also <sys/types.h>.
(kqueue_callback): Remove watch in case of NOTE_DELETE or NOTE_RENAME.
(Fkqueue_rm_watch, Fkqueue_valid_p): New functions.
(syms_of_kqueue): Add them.

8 years agoWork on kqueue
Michael Albinus [Mon, 9 Nov 2015 19:26:10 +0000 (20:26 +0100)]
Work on kqueue

* lisp/filenotify.el (file-notify--library)
(file-notify-descriptors, file-notify-callback)
(file-notify-add-watch, file-notify-rm-watch)
(file-notify-valid-p): Add kqueue support.

* src/keyboard.c (make_lispy_event): Check also for HAVE_KQUEUE.

8 years agoAdd kqueue support
Michael Albinus [Mon, 9 Nov 2015 09:00:56 +0000 (10:00 +0100)]
Add kqueue support

* configure.ac (--with-file-notification): Add kqueue.
(top): Remove special test for "${HAVE_NS}" and
${with_file_notification}, this is handled inside gfilenotify
tests.  Add kqueue tests.  Use NOTIFY_CFLAGS and NOTIFY_LIBS
instead of library specific variables.

* src/Makefile.in: Use NOTIFY_CFLAGS and NOTIFY_LIBS.

* src/emacs.c (main): Call globals_of_kqueue and syms_of_kqueue.

* src/kqueue.c: New file.

* src/lisp.h: Declare extern globals_of_kqueue and syms_of_kqueue.