* shr.el (shr-table-body): New function to find the real body
of a table.
(shr-tag-table): Use it to render several <tbody> tags in a
table (bug#22170).
Sam Steingold [Tue, 22 Dec 2015 17:02:30 +0000 (12:02 -0500)]
clipboard should still work even if interprogram-* is disabled
(clipboard-yank): When `interprogram-cut-function' is nil,
bind it to `gui-selection-value' - the default value.
(clipboard-kill-region, clipboard-kill-ring-save): When
`interprogram-paste-function' is nil, bind it to `gui-select-text' -
the default value.
Phillip Lord [Wed, 16 Dec 2015 23:08:17 +0000 (23:08 +0000)]
ibuffer generate autoloads to non-versioned file.
* lisp/Makefile.in: Add ibuffer-loaddefs to autogenel.
* lisp/ibuf-ext.el: Update file local.
* lisp/ibuffer.el: Remove autoloads and add a require.
* test/lisp/ibuffer-tests.el: Test that autoload is working.
Phillip Lord [Sat, 28 Nov 2015 23:13:24 +0000 (23:13 +0000)]
Tests now depend on source files
* test/Makefile.in: Include dependences from tests to source files.
* test/make-test-deps.emacs-lisp: New file
* .gitignore: Ignore generated make include file
Stefan Monnier [Mon, 30 Nov 2015 15:52:12 +0000 (10:52 -0500)]
* lisp/progmodes/which-func.el: Improve disabling the mode
Use lexical-binding.
(which-func-modes, which-func-non-auto-modes, which-func-maxout)
(which-func, which-func-format): Remove redundant :group arg.
(which-func-try-to-enable): New function.
(which-func-ff-hook, which-function-mode): Use it.
(mode-line-misc-info): Add ourselves here instead of in bindings.el.
* lisp/bindings.el (mode-line-misc-info): Remove which-func-mode entry.
Eli Barzilay [Sun, 29 Nov 2015 20:24:27 +0000 (15:24 -0500)]
* lisp/calculator.el: more improvements and bugfixes.
- Mark `calculator-paste-decimals' as obsolete. (It wasn't having an
effect anyway.)
- Simplify `calculator-number-to-string' by throwing most of the work
onto `number-to-string', leaving just some tweaks for decimal inputs.
This leads to some minor changes, for example, pasting "1x1" in hex
mode would warn that "x" is ignored and result in "11" (and it wasn't
done in decimal mode), whereas now it just ignores everything from the
"x" and on and result in a "1" just like in decimal input mode. Also,
overflows are left for `number-to-string' to deal with.
- `calculator-paste' is very simple as a result.
- Extend the simplified `calculator-paste': with a prefix argument it
pastes a string as if the characters were entered. This can be used
to reduce expressions, but note that it's a simple literal operation,
so precedence can be messed, a number can be paster while entering a
number, spaces and newlines matter, etc.
- Fix a minor bug where "e+" in hex mode wouldn't use "+" as an
operator.
- Fix a bug in `calculator-put-value': avoid grouping in the display
that is used to construct `calculator-curnum'. This would trigger
when pasting or getting a value from a register in some radix mode
with a large enough value. Another fix: make the output radix equal
the input one, otherwise numbers could be converted twice.
Eli Barzilay [Fri, 27 Nov 2015 15:21:30 +0000 (10:21 -0500)]
* lisp/calculator.el: Re-do key bindings.
Use a helper function that arranges a parent keymap that binds alternate
case keys so if some letter key is unbound and it's un/shifted version
is, it will get used. This makes the global-map trickery unnecessary.
Also switch to passing strings that name keys through `kbd'.
Michael Albinus [Sat, 28 Nov 2015 12:56:28 +0000 (13:56 +0100)]
Fix a problem with gfilenotify in filenotify-tests.el
* test/lisp/filenotify-tests.el
(file-notify--test-expected-events): Remove.
(file-notify--test-cleanup): Do not set that variable.
(file-notify--test-with-events): EVENTS can also be a list of lists.
(file-notify-test02-events, file-notify-test04-file-validity):
Adapt expected result.
Stefan Monnier [Wed, 25 Nov 2015 22:03:27 +0000 (17:03 -0500)]
* lisp/emacs-lisp/eieio.el: Add some default implementations
(standard-class): Mark it obsolete.
(slot-missing): Give it a default implementation.
(destructor): Simplify and mark it obsolete.
(object-print): Give it a default implementation.
(eieio-change-class): Rename from change-class.
(change-class): Redefine as obsolete alias.
Michael Albinus [Wed, 25 Nov 2015 14:24:27 +0000 (15:24 +0100)]
Merge from scratch/kqueue
bec57a4 Some final fixes in file notification before merging with master 0247489 Rework file notifications, kqueue has problems with directory monitors 5154781 Continie with pending events 6b490c0 Improve loops in file-notify-test06-many-events c8e266f Handle more complex rename operation in kqueue 5044bdf New test with a larger number of events. 65ba5a9 Further fixes for kqueue. 13f3508 Code cleanup of kqueue.c 99aa855 Doc changes for kqueue 8deebe1 Finish implementation in kqueue.c 90d6c69 * lisp/filenotify.el (file-notify-add-watch): Fix thinko. e95b309 More work on kqueue 41d9bd0 Implement directory events c571fc1 Build fixes for kqueue support. e0a68f2 Continue kqueue implementation 7543d1c Work on kqueue e3354e2 Add kqueue support c6457ce Minor fix to comment indentation and typo in last commit b92307f linum-mode plays more nicely with other margin-setting extensions 58e6235 * lisp/image-mode.el: Support encrypted file 9375652 * lisp/progmodes/verilog-mode.el (verilog-save-buffer-state): Add backquote 47f83b6 ; ChangeLog.2 fixes 7cc233e * lisp/emacs-lisp/package.el: Fix a decoding issue 5f9153f * lisp/emacs-lisp/package.el: Refactor -with-work-buffer-async 353f5e7 * lisp/progmodes/verilog-mode.el: Use with-silent-modifications 70f1fda ; Auto-commit of ChangeLog files. ae0653b * CONTRIBUTE: Remove information about feature freeze. 9459456 Merge branch 'release-process-lowercase' 9a4aa0f Document the release process f8cc14b * admin/release-process: Rename from admin/FOR-RELEASE. dcd5877 gitmerge: Fix git log command 2ac79ae gitmerge: Try to detect cherry-picks 5f7a2a9 Increment Emacs version on master branch ed2e7e2 Mention CONTRIBUTE in README 9e00a02 Update verilog-mode.el to 2015-11-09-b121d60-vpo. 138ad3d ; Fix warnings 7126e9a ; Update xref-etags-mode for the latest change 246d660 Use generic dispatch for xref backends 31f6e93 Support rectangular regions for more commands f103a27 Handle multiple matches on the same line; add highlighting fe973fc Replace xref-match-bounds with xref-match-length 92a5010 Merge from gnulib 04ac097 Spruce up ftfont.c memory allocation 4c4b520 Port recent XCB changes to 64-bit ‘long int’ 4f0ce9c * src/undo.c (run_undoable_change): Now static. 695a6f9 Remove support for ':timeout' from w32 tray notifications a731c2f * test/automated/simple-test.el: Add test for bug#20698 (bug#21885) 2b4c0c0 * lisp/progmodes/elisp-mode.el: Declare function `project-roots' 66b9f7b * src/undo.c: Small fixes for previous change 2fac30e Add a few more variables to redisplay--variables 04f69f1 * lisp/loadup.el: Enlarge the size of the hash table to 80000. e221d32 Fix point positioning after transposing with negative arg 35f5afb Fix last change in shr.el 508e77b Fix last change d60ed3f Another fix for MinGW64 and Cygwin builds due to notifications 805a39b Remove intern calls and XXX comments from Fx_export_frames 9463abf shr: don't invoke unbound function (Bug#21895) 6e5186e * test/automated/keymaps-test.el: Fix test to make it repeatable 0c92826 * test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Small fix 39dbd1c : Tests for undo-auto functionality. 20aa42e ; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change' 44dfa86 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'. d2f73db Bind [?\S-\ ] to previous line command in Dired-like modes. c1bc6e5 Fix the MinGW64 and Cygwin-w32 builds 1e363a8 Enable sorting of JSON object keys when encoding 9dd7da9 * test/automated/keymap-tests.el: New test file aa17de9 Speed up x_real_pos_and_offsets using XCB a838c83 Enable use of XCB for checking window manager state c7f2b6a Detect XCB and save a connection handle e1c27db Reduce some data dependencies between X calls 25e32bd Use color cache for creating bitmap 851be0f Add "^" to the interactive specs of `dired-next/previous-line' 055ca3a Sync with soap-client repository, version 3.0.2 e0f64e7 CC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start. 952395d * lisp/obarray.el: Fix shadowed variables 436d330 Avoid error in submitting a form with EWW e887f6e ; * doc/lispref/os.texi: Fix indentation of sample code. 51d840a Rename seq-p and map-p to seqp and mapp 23036ba Rename obarray-p to obarrayp 20aea42 Rename obarray-foreach to obarray-map a3b2101 New file with obarray functions. 9d43941 Implement tray notifications for MS-Windows
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.
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.
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.
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.
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.
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.
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.
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.
* 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.
* 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.
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.
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.
Phillip Lord [Tue, 24 Nov 2015 21:48:58 +0000 (21:48 +0000)]
Restore delete Makefiles and fix .gitignore.
* .gitignore: Update Makefiles to changed locations
* test/lisp/progmodes/flymake-resources/Makefile,
test/manual/etags/Makefile,
test/manual/etags/make-src/Makefile,
test/manual/indent/Makefile: Restored and moved to new location.
Phillip Lord [Mon, 23 Nov 2015 22:08:52 +0000 (22:08 +0000)]
Test infrastructure: updates after directory move
* (test/Makefile.in): Support directories several levels deep.
* (test/data/flymake): Rename to test/lisp/progmodes/flymake-resources.
* (test/lisp/progmodes/flymake-tests.el): Support renamed resource directory.
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.
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.
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.