summaryrefslogtreecommitdiff
path: root/src/gfilenotify.c
Commit message (Collapse)AuthorAge
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Avoid some unnecessary stdio.h includesPaul Eggert2019-07-08
| | | | | | | | | * src/atimer.c, src/callproc.c, src/coding.c, src/dired.c, src/eval.c: * src/fringe.c, src/ftcrfont.c, src/ftfont.c, src/ftxfont.c: * src/gfilenotify.c, src/indent.c, src/kqueue.c, src/menu.c: * src/scroll.c, src/terminal.c, src/unexcoff.c, src/window.c: * src/xfont.c, src/xftfont.c: Do not include stdio.h since it is unused.
* Remove some unnecessary #ifdef directivesPaul Eggert2019-04-23
| | | | | | | | These directives are in files that are compiled only if the symbols are defined. * src/gfilenotify.c: Remove unnecessary ‘#ifdef HAVE_GFILENOTIFY’. * src/inotify.c: Remove unnecessary ‘#ifdef HAVE_INOTIFY’. * src/kqueue.c: Remove unnecessary ‘#ifdef HAVE_KQUEUE’.
* * src/gfilenotify.c: Fix indenting.Paul Eggert2019-03-04
|
* Merge from origin/emacs-26Paul Eggert2018-12-31
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-01
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Fix check for unsafe watch descriptorPaul Eggert2018-08-13
| | | | | | | | | | | | | | | | * src/lisp.h (make_pointer_integer_unsafe): New function. (make_pointer_integer): Use it. * src/gfilenotify.c (dir_monitor_callback): Omit redundant eassert. (Fgfile_add_watch): Signal an error instead of failing an assertion if the pointer does not work.
* | More macro renamings for bignumTom Tromey2018-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c, src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c, src/category.c, src/ccl.c, src/character.c, src/character.h, src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c, src/composite.c, src/composite.h, src/data.c, src/dbusbind.c, src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c, src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c, src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c, src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c, src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c, src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c, src/indent.c, src/insdel.c, src/intervals.c, src/json.c, src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c, src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c, src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c, src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h, src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c, src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
* | Rename integerp->fixnum, etc, in preparation for bignumsTom Tromey2018-07-12
|/ | | | | | | | | | | | | | | | | * src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c, src/sound.c, src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c, src/textprop.c, src/undo.c, src/w16select.c, src/w32.c, src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c, src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c, src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM, make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP, NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
* Update copyright year to 2018Paul Eggert2018-01-01
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Add an optional testfn parameter to assocNicolas Petton2017-07-11
| | | | | | | | | | | | | | | | | | | | | | | | * src/fns.c (assoc): New optional testfn parameter used for comparison when provided. * test/src/fns-tests.el (test-assoc-testfn): Add tests for the new 'testfn' parameter. * src/buffer.c: * src/coding.c: * src/dbusbind.c: * src/font.c: * src/fontset.c: * src/gfilenotify.c: * src/image.c: * src/keymap.c: * src/process.c: * src/w32fns.c: * src/w32font.c: * src/w32notify.c: * src/w32term.c: * src/xdisp.c: * src/xfont.c: Add a third argument to Fassoc calls. * etc/NEWS: * doc/lispref/lists.texi: Document the new 'testfn' parameter.
* Improve uses of CHECK_LIST etc.Paul Eggert2017-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/eval.c (FletX): Report an error for invalid constructs like ‘(let* (a . 0))’, so that ‘let*’ is more consistent with ‘let’. (lambda_arity): Use plain CHECK_CONS. * src/fns.c (CHECK_LIST_END): Move from here to lisp.h. (Fcopy_alist): Remove unnecessary CHECK_LIST call, since concat does that for us. (Fnthcdr, Fmember, Fmemql, Fdelete, Fnreverse): Use CHECK_LIST_END, not CHECK_LIST_CONS. This hoists a runtime check out of the loop. (Fmemq): Simplify and use CHECK_LIST_END instead of CHECK_LIST. (Fassq, Fassoc, Frassq, Frassoc): Simplify and use CHECK_LIST_END instead of CAR. (assq_no_quit, assoc_no_quit): Simplify and assume proper list. (Fnconc): Use plain CHECK_CONS, and do-while instead of while loop. * src/fontset.c (Fnew_fontset): * src/frame.c (Fmodify_frame_parameters): Use CHECK_LIST_END at end, rather than CHECK_LIST at start, for a more-complete check. * src/gfilenotify.c (Fgfile_add_watch): Omit unnecessary CHECK_LIST, since Fmember does that for us. * src/lisp.h (lisp_h_CHECK_LIST_CONS, CHECK_LIST_CONS): Remove; no longer used. (CHECK_LIST_END): New inline function.
* ; Fix typoMichael Albinus2017-01-01
| | | | * src/gfilenotify.c:
* Merge from origin/emacs-25Paul Eggert2017-01-01
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-31
| | | | | | | | Run admin/update-copyright.
* | * src/gfilenotify.c (Fgfile_monitor_name): Return interned symbol.Michael Albinus2016-12-31
| |
* | * src/gfilenotify.c (Fgfile_monitor_name): Return a symbol.Michael Albinus2016-12-30
| |
* | Improve filenotify-tests.elMichael Albinus2016-12-29
|/ | | | | | | | | | | | | | | | | | | | | | | | * src/inotify.c (Finotify_valid_p): * src/kqueue.c (Fkqueue_valid_p): * src/w32notify.c (Fw32notify_valid_p): * src/gfilenotify.c (Fgfile_valid_p): Fix typo in docstring. (Fgfile_monitor_name): New defun. (syms_of_gfilenotify): Declare Sgfile_monitor_name. * test/lisp/filenotify-tests.el (file-notify--test-read-event): New defun, derived from `file-notify--test-read-event-timeout'. Replace all calls of `read-event' by this. (file-notify--test-timeout): Fix docstring. (file-notify--test-monitor): New defun. (file-notify--deftest-remote): Do not bind `file-notify--test-read-event-timeout' anymore. (file-notify-test00-availability): Print also monitor, if existent. (file-notify--test-with-events): Add an additional `file-notify--test-read-event' call, in order to get it work after `file-notify-add-watch'. Remove special timeout for cygwin. (file-notify-test02-events): Make a better check for cygwin. (file-notify-test06-many-events): Improve event list for cygwin. (file-notify-test08-watched-file-in-watched-dir): Add cygwin case.
* Prefer comments /* like this */ in C codePaul Eggert2016-11-05
| | | | | | | Emacs C code assumes C99 features, but has long used traditional comments /* like this */ instead of C99-style comments // like this. Stick with traditional comments for now, partly for style, partly as it may be safer with compilers that are not fully in C99 mode.
* Rework C source files to avoid ^(Paul Eggert2016-03-10
| | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.
* Fix a stupid error in gfilenotify.c.Michael Albinus2015-11-03
| | | | | * src/gfilenotify.c (dir_monitor_callback): Cancel monitor only, if we've got a `deleted' signal AND the file name is the watched one.
* Include-file cleanup for src directoryPaul Eggert2015-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707). In a few cases, add ‘#include "foo.h"’ if the file needs foo.h but does not include it directly. As a general rule, a source file should include foo.h if it needs the interfaces that foo.h defines. * src/alloc.c: Don’t include process.h. Include dispextern.h, systime.h. * src/atimer.c: Don’t include blockinput.h. * src/buffer.c: Include coding.h, systime.h. Don’t include keyboard.h, coding.h. * src/callint.c: Don’t include commands.h, keymap.h. * src/callproc.c: Don’t include character.h, ccl.h, composite.h, systty.h, termhooks.h. * src/casetab.c: Don’t include character.h. * src/category.c: Don’t include charset.h, keymap.h. * src/ccl.h: Don’t include character.h. * src/character.c: Don’t include charset.h. * src/charset.c: Don’t include disptab.h. * src/chartab.c: Don’t include ccl.h. * src/cm.c: Don’t include frame.h, termhooks.h. * src/cmds.c: Don’t include window.h, dispextern.h. * src/coding.c: Don’t include window.h, frame.h. * src/composite.c: Include composite.h. Don’t include window.h, font.h. * src/data.c: Don’t include syssignal.h, termhooks.h, font.h. * src/dbusbind.c: Don’t include frame.h. * src/decompress.c: Don’t include character.h. * src/dired.c: Don’t include character.h, commands.h, charset.h. * src/dispnew.c: Don’t include character.h, indent.h, intervals.h, process.h, timespec.h. Include systime.h. * src/doc.c: Include coding.h. Don’t include keyboard.h. * src/editfns.c: Include composite.h. Don’t include frame.h. * src/emacs.c: Include fcntl.h, coding.h. Don’t include commands.h, systty.h.. * src/fileio.c: Don’t include intervals.h, dispextern.h. Include composite.h. * src/filelock.c: Don’t include character.h, systime.h. * src/fns.c: Don’t include time.h, commands.h, keyboard.h, keymap.h, frame.h, blockinput.h, xterm.h. Include composite.h. * src/font.c: Include termhooks.h. * src/font.h: Don’t include ccl.h, frame.h. Add forward decls of struct composition_it, struct face, struct glyph_string. * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h, intervals.h, window.h, termhooks.h. * src/frame.c: Don’t include character.h, commands.h, font.h. * src/frame.h: Don’t include dispextern.h. * src/fringe.c: Don’t include character.h. * src/ftcrfont.c: Don’t include dispextern.h, frame.h, character.h, charset.h, fontset.h. * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h, fontset.h. * src/ftxfont.c: Don’t include dispextern.h, character.h, charset.h, fontset.h. * src/gfilenotify.c: Don’t include frame.h, process.h. * src/gtkutil.c: Include dispextern.h, frame.h, systime.h. Don’t include syssignal.h, buffer.h, charset.h, font.h. * src/gtkutil.h: Don’t include frame.h. * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h. Don’t include character.h. * src/indent.c: Don’t include keyboard.h, termchar.h. * src/inotify.c: Don’t include character.h, frame.h. * src/insdel.c: Include composite.h. Don’t include blockinput.h. * src/intervals.c: Don’t include character.h, keyboard.h. * src/intervals.h: Don’t include dispextern.h, composite.h. * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h. Include coding.h. * src/keyboard.h: Don’t incldue systime.h. * src/keymap.c: Don’t include charset.h, frame.h. * src/lread.c: Include dispextern.h and systime.h. Don’t include frame.h. Include systime.h. * src/macros.c: Don’t include commands.h, character.h, buffer.h. * src/menu.c: Include character.h, coding.h. Don’t include dispextern.h. * src/menu.h: Don’t include systime.h. * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h, intervals.h, termhooks.h. * src/print.c: Include coding.h. Don’t include keyboard.h, window.h, dispextern.h, termchar.h, termhooks.h, font.h. Add forward decl of struct terminal. * src/process.c: Don’t include termhooks.h, commands.h, dispextern.h, composite.h. * src/region-cache.c: Don’t include character.h. * src/scroll.c: Don’t include keyboard.h, window.h. * src/search.c: Don’t include category.h, commands.h. * src/sound.c: Don’t include dispextern.h. * src/syntax.c: Don’t include command.h, keymap.h. * src/sysdep.c: Don’t include window.h, dispextern.h. * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’, * src/term.c: Don’t include systty.h, intervals.h, xterm.h. * src/terminal.c: Include character.h. Don’t include charset.h, coding.h. * src/textprop.c: Don’t include character.h. * src/undo.c: Don’t include character.h, commands.h, window.h. * src/unexsol.c: Don’t include character.h, charset.h. * src/widget.c: Include widget.h. Don’t include keyboard.h, window.h, dispextern.h, blockinput.h, character.h, font.h. * src/widgetprv.h: Don’t include widget.h. * src/window.c: Don’t include character.h, menu.h, intervals.h. * src/xdisp.c: Include composite.h, systime.h. Don’t include macros.h, process.h. * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h, intervals.h. * src/xfns.c: Don’t include menu.h, character.h, intervals.h, epaths.h, fontset.h, systime.h, atimer.h, termchar.h. * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h. * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h. * src/xgselect.c: Don’t include timespec.h, frame.h. Include systime.h. * src/xgselect.h: Don’t include time.h. Use a forward decl to struct timespec instead. * src/xmenu.c: Don’t include keymap.h, character.h, charset.h, dispextern.h. Include systime.h. * src/xml.c: Don’t include character.h. * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h. * src/xselect.c: Don’t include dispextern.h, character.h, buffer.h, process.h. * src/xsmfns.c: Don’t include systime.h, sysselect.h. * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h, intervals.h process.h, keymap.h, xgselect.h. Include composite.h.
* * src/gfilenotify.c (Fgfile_add_watch): Cleanup temporary variable.Michael Albinus2015-09-27
|
* * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate.Michael Albinus2015-09-24
|
* Continue gfilenotify.c implementation of missing partsMichael Albinus2015-09-23
| | | | | | | | | | | | | * lisp/filenotify.el (file-notify-add-watch): Append `flags' to `gfile-add-watch' call. (file-notify-rm-watch): Modify `file-notify-descriptors' only after calling the low level functions. * src/gfilenotify.c (dir_monitor_callback): Check, whether event_type is expected. (Fgfile_add_watch): Allow also `change'and `attribute-change' for FLAGS. (Fgfile_rm_watch): Fix typo. (syms_of_gfilenotify): Declare Qchange and Qattribute_change.
* Implement gfile-valid-pMichael Albinus2015-09-22
| | | | | | | | | | | | * lisp/filenotify.el (file-notify-callback): Fix typo. (gfile-valid-p): Remove defalias. * src/gfilenotify.c (dir_monitor_callback): Cancel the monitor if the file or directory to be watched is deleted. (Fgfile_add_watch): Make watch_object a triple. (Fgfile_rm_watch): Check, whether watch is cancelled already. (Fgfile_valid_p): New defun. (syms_of_gfilenotify): Declare Sgfile_valid_p.
* * src/gfilenotify.c (Fgfile_add_watch):Michael Albinus2015-08-21
| | | | Handle errors from g_file_monitor.
* Don't quote symbols 'like-this' in docstrings etc.Paul Eggert2015-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/uvs.el (uvs-insert-fields-as-bytes): * lisp/allout-widgets.el (allout-widgets-count-buttons-in-region): * lisp/allout.el (allout-add-resumptions, allout-mode): * lisp/calculator.el (calculator-operators): * lisp/cedet/data-debug.el (dd-propertize): * lisp/cedet/ede/proj-prog.el (ede-proj-target-makefile-program): * lisp/cedet/semantic/analyze/debug.el: (semantic-analyzer-debug-global-miss-text): * lisp/cedet/semantic/lex-spp.el: (semantic-lex-spp-replace-or-symbol-or-keyword): * lisp/cedet/semantic/symref.el: (semantic-symref-cleanup-recent-buffers-fcn): * lisp/cedet/semantic/tag.el (semantic-tag-class): * lisp/cedet/srecode/el.el (srecode-semantic-handle-:el-custom): * lisp/gnus/nnmairix.el (nnmairix-propagate-marks-upon-close): * lisp/gnus/pop3.el (pop3-authentication-scheme): * lisp/help-fns.el (describe-function-orig-buffer): * lisp/imenu.el (imenu--history-list): * lisp/mail/feedmail.el (feedmail-confirm-outgoing) (feedmail-display-full-frame, feedmail-deduce-bcc-where) (feedmail-queue-default-file-slug) (feedmail-queue-buffer-file-name): * lisp/net/mairix.el (mairix-searches-mode-map): * lisp/net/newst-backend.el (newsticker-retrieval-method) (newsticker-auto-mark-filter-list): * lisp/obsolete/vi.el (vi-mode): * lisp/progmodes/cc-engine.el (c-literal-type): * lisp/progmodes/cpp.el (cpp-face): * lisp/progmodes/ebrowse.el (ebrowse-electric-list-looper): * lisp/progmodes/elisp-mode.el (elisp--xref-make-xref): * lisp/progmodes/pascal.el (pascal-auto-lineup): * lisp/progmodes/prog-mode.el (prog-widen): * lisp/progmodes/verilog-mode.el (verilog-regexp-words) (verilog-auto-lineup, verilog-auto-reset-widths) (verilog-auto-arg-format, verilog-auto-inst-template-numbers): * lisp/textmodes/flyspell.el (flyspell-maybe-correct-transposition) (flyspell-maybe-correct-doubling): * lisp/textmodes/table.el (table-justify, table-justify-cell) (table-justify-row, table-justify-column, table-insert-sequence) (table--justify-cell-contents): * lisp/url/url-auth.el (url-get-authentication): * lisp/window.el (display-buffer-record-window): * lisp/xml.el (xml-parse-file, xml-parse-region): * src/gfilenotify.c (Fgfile_add_watch): Don't quote symbols with apostrophes in doc strings. Use asymmetric quotes instead. * lisp/cedet/semantic/complete.el (semantic-displayor-show-request): Likewise for symbol in diagnostic. * lisp/image.el (image-extension-data): * lisp/register.el (frame-configuration-to-register): * src/buffer.c (syms_of_buffer): Remove bogus apostrophes after symbols. * lisp/thumbs.el (thumbs-conversion-program): Quote Lisp string values using double-quotes, not apostrophes.
* Remove unused DEFSYMsPaul Eggert2015-05-31
| | | | | | | | | | | | | Remove DEFSYMs that aren't used at the C level. Also: * src/decompress.c (Qzlib_dll): * src/font.c (Qunicode_sip): * src/frame.c (Qtip_frame): * src/ftfont.c (Qserif): * src/gnutls.c (Qgnutls_dll): * src/xml.c (Qlibxml2_dll): Move from here ... * src/w32fns.c (syms_of_w32fns): ... to here, as these are used only on MS-Windows.
* Refactor pointer-to-integer conversionPaul Eggert2015-01-09
| | | | | | | | * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): Rename and move to lisp.h. All uses changed. * lisp.h (XINTPTR, make_pointer_integer): New inline functions, which are renamed from gfilenotify.c's lisp_to_monitor and monitor_to_lisp, and with more-generic void * signatures.
* * src/gfilenotify.c (monitor_to_lisp, lisp_to_monitor):Paul Eggert2015-01-07
| | | | Port recent fix to !USE_LSB_TAG platforms.
* Port GFileMonitor * hack to Qnil==0 platformsPaul Eggert2015-01-07
| | | | | | Reported by Glenn Morris in: http://bugs.gnu.org/15880#112 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions. (dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.
* Compute C decls for DEFSYMs automaticallyPaul Eggert2015-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Bug#15880. This patch also makes Q constants (e.g., Qnil) constant addresses from the C point of view. * make-docfile.c: Revamp to generate table of symbols, too. Include <stdbool.h>. (xstrdup): New function. (main): Don't process the same file twice. (SYMBOL): New constant in enum global_type. (struct symbol): Turn 'value' member into a union, either v.value for int or v.svalue for string. All uses changed. (add_global): New arg svalue, which overrides value, so that globals can have a string value. (close_emacs_global): New arg num_symbols; all uses changed. Output lispsym decl. (write_globals): Output symbol globals too. Output more ATTRIBUTE_CONST, now that Qnil etc. are C constants. Output defsym_name table. (scan_c_file): Move most of guts into ... (scan_c_stream): ... new function. Scan for DEFSYMs and record symbols found. Don't read past EOF if file doesn't end in newline. * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle: * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c: * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c: * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c: * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c: * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c: * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m: * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c: * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c: * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c: * xselect.c, xsettings.c, xterm.c: Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs). These names are now defined automatically by make-docfile. * alloc.c (init_symbol): New function. (Fmake_symbol): Use it. (c_symbol_p): New function. (valid_lisp_object_p, purecopy): Use it. * alloc.c (marked_pinned_symbols): Use make_lisp_symbol instead of make_lisp_ptr. (garbage_collect_1): Mark lispsym symbols. (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro. (mark_object): Use it. (sweep_symbols): Sweep lispsym symbols. (symbol_uses_obj): New function. (which_symbols): Use it. Work for lispsym symbols, too. (init_alloc_once): Initialize Vpurify_flag here; no need to wait, since Qt's address is already known now. (syms_of_alloc): Add lispsym count to symbols_consed. * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0), when testing whether storage is all bits zero. * dispextern (struct image_type): * font.c (font_property_table): * frame.c (struct frame_parm_table, frame_parms): * keyboard.c (scroll_bar_parts, struct event_head): * xdisp.c (struct props): Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and Lisp_Object *, since Qfoo is no longer an object whose address can be taken. All uses changed. * eval.c (run_hook): New function. Most uses of Frun_hooks changed to use it, so that they no longer need to take the address of a Lisp sym. (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable. * frame.c (syms_of_frame): Add defsyms for the frame_parms table. * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here. DEFSYM Qdeactivate_mark before the corresponding var. * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line instead of interning their symbols; this avoids duplicates. (LISP_INITIALLY, TAG_PTR) (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT): New macros. (LISP_INITIALLY_ZERO): Use it. (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol) (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*): Move decls up, to avoid forward uses. Include globals.h earlier, too. (make_lisp_symbol): New function. (XSETSYMBOL): Use it. (DEFSYM): Now just a placeholder for make-docfile. * lread.c (DEFINE_SYMBOLS): Define, for globals.h. (intern_sym): New function, with body taken from old intern_driver. (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t. All uses changed. (define_symbol): New function. (init_obarray): Define the C symbols taken from lispsym. Use plain DEFSYM for Qt and Qnil. * syntax.c (init_syntax_once): No need to worry about Qchar_table_extra_slots.
* Update copyright year to 2015Paul Eggert2015-01-01
| | | | Run admin/update-copyright.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-01
|
* Port --without-x --enable-gcc-warnings to Fedora 19.Paul Eggert2013-09-06
| | | | | | | | | | * configure.ac (WERROR_CFLAGS): Omit redundant use of -Wmissing-field-initializers, -Wswitch, -Wtype-limits, -Wunused-parameter. If there is no window system, also omit -Wsuggest-attribute=const and -Wsuggest-attribute=noreturn; this is needed for Fedora 19. * src/gfilenotify.c (globals_of_gfilenotify): Call g_type_init only if using an older glib version that needs it.
* * fileio.c (report_file_errno): Fix errno reporting bug.Paul Eggert2013-07-16
| | | | | | | | If the file name is neither null nor a pair, package it up as a singleton list. All callers changed, both to this function and to report_file_error. This fixes a bug where the memory allocator invoked by list1 set errno so that the immediately following report_file_error reported the wrong errno value.
* Spelling fixes for "does not exists".Paul Eggert2013-07-15
|
* * fileio.c (Qfile_notify_error): New error symbol.Michael Albinus2013-07-04
| | | | | | | | | | * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch): * inotify.c (inotify_callback, symbol_to_inotifymask) (Finotify_add_watch, Finotify_rm_watch): Use it. (inotifyevent_to_event): Exchange order of cookie and file name. (Finotify_add_watch): Adapt docstring. * lisp.h (Qfile_notify_error): Declare.
* A few porting etc. fixes for the new file monitor code.Paul Eggert2013-06-06
| | | | | | | | | | | | | | | | | | | See the thread containing <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>. * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch) (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer. (dir_monitor_callback, Fgfile_rm_watch): Use assq_no_quit instead of Fassoc, for speed. (dir_monitor_callback, Fgfile_rm_watch): eassert that the monitor is a fixnum. (dir_monitor_callback): No need for CDR_SAFE. Simplify building of lisp with alternative tails. (Fgfile_add_watch, Fgfile_rm_watch): Do not assume glib functions set errno reliably on failure. (Fgfile_add_watch): Check that the monitor survives the XIL trick, and signal an error otherwise. (Fgfile_rm_watch): Prefer CONSP to !NILP. Use Fdelq instead of Fdelete, for speed.
* * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.Michael Albinus2013-06-05
| | | | | | | * gfilenotify.c (globals_of_gfilenotify): New function. (syms_of_gfilenotify): Move global initialization there. * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
* * configure.ac (file-notification): New option, replaces inotify option.Michael Albinus2013-06-03
(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.