aboutsummaryrefslogtreecommitdiffstats
path: root/lisp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Some final fixes in file notification before merging with masterMichael Albinus2015-11-251-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Rework file notifications, kqueue has problems with directory monitorsMichael Albinus2015-11-251-3/+3
| | | | | | | | | | | | | | | | | | | * 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.
* Further fixes for kqueue.Michael Albinus2015-11-251-1/+5
| | | | | | | | | | | | | | | | | | | | | * 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.
* * lisp/filenotify.el (file-notify-add-watch): Fix thinko.Michael Albinus2015-11-251-2/+2
|
* More work on kqueueMichael Albinus2015-11-251-12/+9
| | | | | | | | | | * 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.
* Implement directory eventsMichael Albinus2015-11-251-2/+2
| | | | | | | | | | | | | * 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.
* Continue kqueue implementationMichael Albinus2015-11-251-2/+2
| | | | | | | | | | * 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.
* Work on kqueueMichael Albinus2015-11-251-17/+23
| | | | | | | | | * 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.
* Minor fix to comment indentation and typo in last commitJoão Távora2015-11-171-2/+2
| | | | | * linum.el (linum-update-window): Fix comment indentation and a typo.
* linum-mode plays more nicely with other margin-setting extensionsJoão Távora2015-11-171-5/+18
| | | | | | | | | | | | | | | | | 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.
* * lisp/image-mode.el: Support encrypted fileDaiki Ueno2015-11-171-1/+6
| | | | | (image-toggle-display-image): Read content from the buffer instead of the file, if the buffer holds a decrypted data. (Bug#21870)
* * lisp/progmodes/verilog-mode.el (verilog-save-buffer-state): Add backquoteJuanma Barranquero2015-11-161-1/+1
|
* * lisp/emacs-lisp/package.el: Fix a decoding issueArtur Malabarba2015-11-152-26/+32
| | | | | | | | | | | (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
* * lisp/emacs-lisp/package.el: Refactor -with-work-buffer-asyncArtur Malabarba2015-11-151-82/+76
| | | | | | | | | | | | | | | | | | | (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'.
* * lisp/progmodes/verilog-mode.el: Use with-silent-modificationsStefan Monnier2015-11-151-19/+27
| | | | | | (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.
* Increment Emacs version on master branchEli Zaretskii2015-11-141-1/+1
| | | | | | | | * 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.
* Update verilog-mode.el to 2015-11-09-b121d60-vpo.Wilson Snyder2015-11-131-227/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* ; Fix warningsDmitry Gutov2015-11-141-1/+1
| | | | | * lisp/vc/diff-mode.el (diff-kill-applied-hunks): Fix unused variable warnings.
* ; Update xref-etags-mode for the latest changeDmitry Gutov2015-11-141-8/+3
|
* Use generic dispatch for xref backendsDmitry Gutov2015-11-143-73/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Support rectangular regions for more commandsJuri Linkov2015-11-144-138/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* Handle multiple matches on the same line; add highlightingDmitry Gutov2015-11-141-21/+23
| | | | | | | | * 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.
* Replace xref-match-bounds with xref-match-lengthDmitry Gutov2015-11-141-52/+47
| | | | | | | | | | | | | | | 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.
* * lisp/progmodes/elisp-mode.el: Declare function `project-roots'Juanma Barranquero2015-11-131-0/+1
|
* Add a few more variables to redisplay--variablesEli Zaretskii2015-11-131-1/+3
| | | | | * lisp/frame.el (redisplay--variables): Add bidi-paragraph-direction and bidi-display-reordering to the list.
* * lisp/loadup.el: Enlarge the size of the hash table to 80000.Eli Zaretskii2015-11-131-1/+1
|
* Fix point positioning after transposing with negative argEli Barzilay2015-11-131-1/+2
| | | | | | * 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)
* Fix last change in shr.elEli Zaretskii2015-11-131-6/+5
| | | | | * lisp/net/shr.el (shr--have-one-fringe-p): Rename from have-fringes-p. All callers changed. Doc fix. (Bug#21895)
* shr: don't invoke unbound function (Bug#21895)Eric Hanchrow2015-11-121-10/+10
| | | | | * lisp/net/shr.el (have-fringes-p): New function. (shr-insert-document, shr-fill-text): Use it.
* ; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change'Phillip Lord2015-11-121-0/+137
|\ | | | | | | | | | | Conflicts: src/cmds.c src/keyboard.c
| * The heuristic that Emacs uses to add an `undo-boundary' has beenPhillip Lord2015-11-121-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Bind [?\S-\ ] to previous line command in Dired-like modes.Juri Linkov2015-11-124-1/+5
| | | | | | | | | | | | | | | | | | * 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)
* | Enable sorting of JSON object keys when encodingSimen Heggestøyl2015-11-121-39/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Add "^" to the interactive specs of `dired-next/previous-line'Eli Barzilay2015-11-121-2/+2
| | | | | | | | | | | | | | * 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.
* | Sync with soap-client repository, version 3.0.2Thomas Fitzsimmons2015-11-112-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | CC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start.Alan Mackenzie2015-11-112-22/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * lisp/obarray.el: Fix shadowed variablesArtur Malabarba2015-11-111-12/+13
| | | | | | | | | | (obarray-map, obarray-remove, obarray-put, obarray-get): Change OBARRAY arg to OB to avoid shadowing ‘obarray’.
* | Avoid error in submitting a form with EWWEli Zaretskii2015-11-111-11/+12
| | | | | | | | | | * lisp/gnus/mm-url.el (mm-url-form-encode-xwfu): Allow argument CHUNK to be nil. (Bug#21881)
* | Rename seq-p and map-p to seqp and mappNicolas Petton2015-11-112-8/+8
| | | | | | | | | | | | | | * 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.
* | Rename obarray-p to obarraypNicolas Petton2015-11-111-1/+1
| | | | | | | | | | * lisp/obarray.el (obarrayp): New name. * test/automated/obarray-tests.el: Update the tests.
* | Rename obarray-foreach to obarray-mapNicolas Petton2015-11-111-1/+1
| | | | | | | | | | * lisp/obarray.el (obarray-map): New name. * test/automated/obarray-tests.el: Update the corresponding tests.
* | New file with obarray functions.Przemysław Wojnowski2015-11-111-0/+65
| | | | | | | | | | * lisp/obarray.el: basic obarray functions extracted from abbrev.el * test/automated/obarray-tests.el: new file
* | Optimize `file-equal-p' and `file-in-directory-p' in TrampMichael Albinus2015-11-115-8/+28
| | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-handle-file-equal-p) (tramp-handle-file-in-directory-p): New defuns. Suggested by Harvey Chapman <hchapman@3gfp.com> * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use them.
* | Spelling fixesPaul Eggert2015-11-106-12/+12
| | | | | | | | | | * lisp/net/soap-inspect.el (soap-inspect-xs-simple-type): Fix misspelling in output.
* | * doc/lispref/variables.texi (Directory Local Variables):Artur Malabarba2015-11-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | Document dir-locals wildcards * lisp/files.el (dir-locals-file): Point to Info node. * doc/emacs/custom.texi (Directory Variables): Document dir-locals wildcards. * etc/NEWS: Document new functionality.
* | * lisp/files.el: Don't allow customization of dir-locals sortingArtur Malabarba2015-11-101-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | In retrospect, this is not a good idea for the same reason that `dir-locals-file' is a defconst, because it is important that this behaviour be "uniform across different environments and users". Sure, the user can still change the sorting with a hack, but we shouldn't encourage them to change it. (dir-locals--all-files): Return list in the order returned by `file-expand-wildcards'. (file-expand-wildcards): Document the sorting predicate used. (dir-locals-sort-predicate): Delete variable.
* | * lisp/files.el (dir-locals-read-from-file): Better handle errorsArtur Malabarba2015-11-101-4/+11
| |
* | * lisp/isearch.el (search-default-regexp-mode): change default valueArtur Malabarba2015-11-101-1/+1
| |
* | * lisp/files.el (dir-locals-find-file): Don't stop at unreadable filesArtur Malabarba2015-11-101-16/+6
| | | | | | | | | | `locate-dominating-file' will now keep looking if the files it finds in a given directory are unreadable (or not files).
* | * lisp/files.el (dir-locals-file): Allow wildcardsArtur Malabarba2015-11-103-91/+153
| | | | | | | | | | | | | | | | | | | | | | | | (dir-locals-find-file, dir-locals-collect-variables) (dir-locals-read-from-file): Update accordingly. (hack-dir-local-variables): Rename a local variable. * lisp/files-x.el (modify-dir-local-variable): Update accordingly * lisp/help-fns.el (describe-variable): Update accordingly * .gitignore: Add .dir-locals?.el