1. 02 Jun, 2013 1 commit
    • David Engster's avatar
      Merge from CEDET upstream (8564). · 890f7890
      David Engster authored
      * lisp/emacs-lisp:
      
      	* emacs-lisp/eieio.el (eieio--defalias, eieio-hook)
      	(eieio-error-unsupported-class-tags, eieio-skip-typecheck)
      	(eieio-optimize-primary-methods-flag, eieio-initializing-object)
      	(eieio-unbound, eieio-default-superclass)
      	(eieio--define-field-accessors, method-static, method-before)
      	(method-primary, method-after, method-num-lists)
      	(method-generic-before, method-generic-primary)
      	(method-generic-after, method-num-slots)
      	(eieio-specialized-key-to-generic-key)
      	(eieio--check-type, class-v, class-p)
      	(eieio-class-name, define-obsolete-function-alias)
      	(eieio-class-parents-fast, eieio-class-children-fast)
      	(same-class-fast-p, class-constructor, generic-p)
      	(generic-primary-only-p, generic-primary-only-one-p)
      	(class-option-assoc, class-option, eieio-object-p)
      	(class-abstract-p, class-method-invocation-order)
      	(eieio-defclass-autoload-map, eieio-defclass-autoload)
      	(eieio-class-un-autoload, eieio-defclass)
      	(eieio-eval-default-p, eieio-perform-slot-validation-for-default)
      	(eieio-add-new-slot, eieio-copy-parents-into-subclass)
      	(eieio--defgeneric-init-form, eieio-defgeneric-form)
      	(eieio-defgeneric-reset-generic-form)
      	(eieio-defgeneric-form-primary-only)
      	(eieio-defgeneric-reset-generic-form-primary-only)
      	(eieio-defgeneric-form-primary-only-one)
      	(eieio-defgeneric-reset-generic-form-primary-only-one)
      	(eieio-unbind-method-implementations)
      	(eieio--defmethod, eieio--typep)
      	(eieio-perform-slot-validation, eieio-validate-slot-value)
      	(eieio-validate-class-slot-value, eieio-barf-if-slot-unbound)
      	(eieio-oref, eieio-oref-default, eieio-default-eval-maybe)
      	(eieio-oset, eieio-oset-default, eieio-slot-originating-class-p)
      	(eieio-slot-name-index, eieio-class-slot-name-index)
      	(eieio-set-defaults, eieio-initarg-to-attribute)
      	(eieio-attribute-to-initarg, eieio-c3-candidate)
      	(eieio-c3-merge-lists, eieio-class-precedence-c3)
      	(eieio-class-precedence-dfs, eieio-class-precedence-bfs)
      	(eieio-class-precedence-list, eieio-generic-call-methodname)
      	(eieio-generic-call-arglst, eieio-generic-call-key)
      	(eieio-generic-call-next-method-list)
      	(eieio-pre-method-execution-functions, eieio-generic-call)
      	(eieio-generic-call-primary-only, eieiomt-method-list)
      	(eieiomt-optimizing-obarray, eieiomt-install)
      	(eieiomt-add, eieiomt-next, eieiomt-sym-optimize)
      	(eieio-generic-form, eieio-defmethod, make-obsolete)
      	(eieio-defgeneric, make-obsolete): Moved to eieio-core.el
      	(defclass): Remove `eval-and-compile' from macro.
      	(call-next-method, shared-initialize): Instead of using
      	`scoped-class' variable, use new eieio--scoped-class, and
      	eieio--with-scoped-class.
      	(initialize-instance): Rename local variable 'scoped-class' to
      	'this-class' to remove ambiguitity from old global.
      
      	* emacs-lisp/eieio-core.el: New file.  Derived from key parts of
      	eieio.el.
      	(eieio--scoped-class-stack): New variable
      	(eieio--scoped-class): New fcn
      	(eieio--with-scoped-class): New scoping macro.
      	(eieio-defclass): Use pushnew instead of add-to-list.
      	(eieio-defgeneric-form-primary-only-one, eieio-oset-default)
      	(eieio-slot-name-index, eieio-set-defaults, eieio-generic-call)
      	(eieio-generic-call-primary-only, eieiomt-add): Instead of using
      	`scoped-class' variable, use new eieio--scoped-class, and
      	eieio--with-scoped-class.
      
      	* emacs-lisp/eieio-base.el (cl-lib): Require during compile.
      
      * admin/grammars:
      
      	* grammars/srecode-template.wy (variable): Accept a single number
      	as a variable value.  Allows the 'priority' to be set to a number.
      	(wisent-srecode-template-lexer): Move number up so it can be
      	created.
      
      * etc/srecode:
      
      	* srecode/c.srt (header_guard): Add :c parameter so it works
      	standalone
      
      * lisp/cedet:
      
      	* semantic/edit.el (semantic-change-function): Use
      	`save-match-data' around running hooks.
      
      	* semantic/decorate/mode.el
      	(semantic-decorate-style-predicate-default)
      	(semantic-decorate-style-highlighter-default): New.
      	(semantic-decoration-mode): Do not require
      	`semantic/decorate/include' anymore.
      	(semantic-toggle-decoration-style): Error if an unknown decoration
      	style is toggled.
      	(define-semantic-decoration-style): Add new :load option.  When
      	:load is specified, add autoload tokens for the definition
      	functions so that code is loaded when the mode is used.
      	(semantic-decoration-on-includes): New autoload definition for
      	highlighting includes.
      
      	* semantic/bovine/c.el (semantic-lex-c-ifdef): Allow some misc
      	characters to appear after the tested variable.
      
      	* semantic/ede-grammar.el (project-compile-target): Calculate full
      	src name via ede-expand-filename instead of the crutch of the
      	current buffer.  Enables this target to compile in batch mode.
      
      	* semantic/idle.el
      	(semantic-idle-symbol-maybe-highlight): Wrap highlighting of
      	remote symbol with `save-excursion'.
      	(semantic-idle-scheduler-work-parse-neighboring-files): Instead of
      	using directory-files on each found mode pattern, collect all the
      	patterns for the current mode, and then for each file, see if it
      	matches any of them.  If it does, parse the file.  (Patch
      	inspiration from Tomasz Gajewski.)
      
      	* semantic/ctxt.el (semantic-ctxt-end-of-symbol): New.
      	(semantic-ctxt-current-symbol-default): New.
      
      	* semantic/bovine/el.el (semantic-default-elisp-setup): Add
      	autoload cookie.  Explain existence.
      	(footer): Add local variable for loaddefs.
      
      	* semantic/db.el (semanticdb-file-table-object): Add new filter,
      	only checking for regular files too.
      
      	* semantic/wisent/python.el
      	(semantic-format-tag-abbreviate): New override.  Cuts back on size
      	of code tags.
      
      	* srecode/compile.el (srecode-compile-templates): Fix warning
      	punctuation.  Remove status messages to clean up testing output
      
      	* ede/base.el (ede-project-placeholder-cache-file): Update doc to
      	mention 'nil' value.
      	(ede-save-cache): Disable cache save if file is nil.
      
      	* ede.el (ede-initialize-state-current-buffer): Flush deleted
      	projects.
      	(global-ede-mode): Always append our find-file-hook to the end.
      	(ede-flush-deleted-projects): New command.
      
      	* ede/cpp-root.el (ede-preprocessor-map): Protect against init
      	problems.
      
      	* ede/proj.el (ede-proj-target): Added a new "custom" option for
      	custom symbols representing a compiler or linker instead of
      	restricting things to only the predefined compilers and linkers.
      
      	* semantic.el (semantic-mode-map): To avoid showing showing
      	Development menu twice, only disable menu item if menu-bar is
      	actually enabled, otherwise the popup 'global menu' might display
      	a disabled Development menu.
      
      	* semantic/complete.el
      	(semantic-displayor-show-request): Fix which slot in obj is set to
      	the max tags.
      890f7890
  2. 01 Jun, 2013 1 commit
  3. 31 May, 2013 1 commit
  4. 25 May, 2013 3 commits
  5. 24 May, 2013 1 commit
  6. 15 May, 2013 1 commit
    • Stefan Monnier's avatar
      Use just DOC instead of DOC-nn.mm. · 6e911150
      Stefan Monnier authored
      * lisp/loadup.el: Just use unversioned DOC.
      * Makefile.in (install-doc): DOC file is not version specific any more.
      * .bzrignore: Don't ignore DOC-* any more.
      * admin/quick-install-emacs: Don't prune DOC-* files a any more.
      * doc/lispref/loading.texi (Autoload):
      * doc/lispref/help.texi (Documentation Basics, Accessing Documentation)
      (Accessing Documentation, Accessing Documentation): DOC-* is now DOC.
      * etc/.gitignore: Don't ignore DOC-* any more.
      * lib-src/makefile.w32-in ($(DOC)): Use DOC rather than DOC-X.
      * msdos/sed1x.inp: Don't rewrite DOC any more.
      * nt/makefile.w32-in (clean, top-distclean): DOC-X doesn't exist any more.
      * src/Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
      * src/makefile.w32-in (DOC): Use just "DOC".
      6e911150
  7. 07 May, 2013 2 commits
    • Paul Eggert's avatar
      Use Gnulib ACL implementation, for benefit of Solaris etc. · ffdc270a
      Paul Eggert authored
      * configure.ac: Remove -with-acl option, since Gnulib does that for
      us now.
      (LIBACL_LIBS): Remove; no longer needed.
      * lib/Makefile.am (CLEANFILES, SUFFIXES): New (empty) macros,
      for the benefit of the new ACL implementation.
      * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/acl-errno-valid.$(O).
      ($(BLD)/acl-errno-valid.$(O)): New rule.
      * lib/acl-errno-valid.c, lib/acl-internal.h, lib/acl.h:
      * lib/acl_entries.c, lib/errno.in.h, lib/file-has-acl.c:
      * lib/qcopy-acl.c, lib/qset-acl.c, m4/acl.m4, m4/errno_h.m4:
      New files, taken from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * admin/merge-gnulib (GNULIB_MODULES): Add qacl.
      (GNULIB_TOOL_FLAGS): Do not avoid errno.
      * etc/NEWS: Emacs is no longer limited to POSIX ACLs.  --disable-acl,
      not --without-acl, since we're now using Gnulib's implementation.
      * nt/config.nt (HAVE_ACL_SET_FILE): Rename from HAVE_POSIX_ACL.
      * nt/inc/ms-w32.h (EOPNOTSUPP): New macro.
      * src/Makefile.in (LIB_ACL): New macro.
      (LIBACL_LIBS): Remove.
      (LIBES): Use LIB_ACL, not LIBACL_LIBS.
      * src/fileio.c: Include <acl.h>.
      Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
      (ACL_NOT_WELL_SUPPORTED): Remove.  All uses replaced by
      !acl_errno_valid.
      (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
      it ourselves.
      
      Fixes: debbugs:14295
      ffdc270a
    • YAMAMOTO Mitsuharu's avatar
      Add multi-monitor support on X11. · 4e3f9230
      YAMAMOTO Mitsuharu authored
      4e3f9230
  8. 05 May, 2013 1 commit
    • Paul Eggert's avatar
      `write-region-inhibit-fsync' defaults to noninteractive. · cbee2131
      Paul Eggert authored
      * cmdargs.texi (Initial Options):
      * files.texi (Customize Save): Document this.
      * etc/NEWS: Document this.
      * src/fileio.c (syms_of_fileio): Implement this.
      * src/filelock.c (create_lock_file): If symbolic links don't work, so
      we use a regular file as a lock file, do not fsync the lock file;
      it's not needed.
      
      Fixes: debbugs:14273
      cbee2131
  9. 24 Apr, 2013 1 commit
  10. 18 Apr, 2013 1 commit
  11. 15 Apr, 2013 1 commit
  12. 13 Apr, 2013 1 commit
    • Stephen Berman's avatar
      Make `split-window' a non-interactive function. · 0aa3616e
      Stephen Berman authored
      * doc/lispref/windows.texi (Splitting Windows): Change category of
      split-window from a command to a function.
      
      * etc/NEWS: Mention fixing `split-window' to be non-interactive.
      
      * window.el (split-window): Remove interactive form, since as a
      command this function is a special case of split-window-below.
      Correct doc string.
      0aa3616e
  13. 09 Apr, 2013 2 commits
  14. 07 Apr, 2013 1 commit
  15. 02 Apr, 2013 2 commits
    • Fabrice Niessen's avatar
      3a2b589f
    • Paul Eggert's avatar
      Use UTF-8 for most files with non-ASCII characters. · 4b725a70
      Paul Eggert authored
      * admin/notes/unicode (etc/tutorials/TUTORIAL.ko, leim/quail/hanja.el)
      (leim/quail/hanja3.el, leim/quail/symbol-ksc.el):
      Now utf-8, not iso-2022-7bit.  Also, files that contain non-UTF-8
      characters are now encoded in utf-8-emacs, not iso-2022-7bit.
      * etc/tutorials/TUTORIAL.ko, tutorials/TUTORIAL.th:
      Switch from iso-2022-7bit to utf-8.
      * leim/quail/cyrillic.el, leim/quail/czech.el, leim/quail/ethiopic.el:
      * leim/quail/greek.el, leim/quail/hanja.el, leim/quail/hanja3.el:
      * leim/quail/hebrew.el, leim/quail/lao.el, leim/quail/lrt.el:
      * leim/quail/slovak.el, leim/quail/symbol-ksc.el, leim/quail/thai.el:
      * leim/quail/tibetan.el, leim/quail/viqr.el, leim/quail/vntelex.el:
      * leim/quail/vnvni.el, leim/quail/welsh.el:
      * lisp/international/latin1-disp.el, lisp/international/mule-util.el:
      * lisp/language/cyril-util.el, lisp/language/european.el:
      * lisp/language/ind-util.el, lisp/language/lao-util.el, lisp/language/thai.el:
      * lisp/language/tibet-util.el, lisp/language/tibetan.el:
      * lisp/language/viet-util.el:
      Switch from iso-2022-7bit to utf-8 or (if needed) utf-8-emacs.
      
      Fixes: debbugs:13936
      4b725a70
  16. 30 Mar, 2013 3 commits
  17. 21 Mar, 2013 1 commit
    • David Engster's avatar
      Merge with CEDET upstream (rev. 8499). · e8cc7880
      David Engster authored
      lisp/
      
      * eieio/eieio-datadebug.el (data-debug/eieio-insert-slots):
        Inhibit read only while inserting objects.
      
      lisp/cedet/
      
      * semantic.el (navigate-menu): Yank Tag :enable. Make sure
      `senator-tag-ring' is bound.
      (semantic-parse-region-default): Stop reversing the output of
      parse-whole-stream.
      (semantic-repeat-parse-whole-stream): Append returned tags
      differently, so they come out in the right order.
      
      * semantic/sb.el (semantic-sb-filter-tags-of-class): New option.
      (semantic-sb-fetch-tag-table): Filter tags being bucketed to exclude
      tags belonging to above filtered classes.
      
      * semantic/find.el (semantic-filter-tags-by-class): New function.
      
      * semantic/tag-ls.el (semantic-tag-similar-p-default): Add
      short-circuit in case tag1 and 2 are identical.
      
      * semantic/analyze/fcn.el
      (semantic-analyze-dereference-metatype-stack): Use
      `semantic-tag-similar-p' instead of 'eq' when comparing two tags
      during metatype evaluation in case they are the same, but not the same
      node. (Tweaked patch from Tomasz Gajewski) (Tiny change)
      
      * semantic/db-find.el (semanticdb-partial-synchronize): Fix require to
      semantic/db-typecache to be correct.
      (semanticdb-find-tags-external-children-of-type): Make this a brutish
      search by default.
      
      * semantic/sort.el (semantic-tag-external-member-children-default):
      When calling `semanticdb-find-tags-external-children-of-type', pass in
      the input tag as the place to start searching for externally defined
      methods.
      
      * semantic/db-file.el (semanticdb-default-save-directory): Doc
      fix: Add ref to default value.
      
      * semantic/complete.el (semantic-complete-post-command-hook): When
      detecting if cursor is outside completion area, do so if cursor moves
      before start of overlay, or the original starting location of the
      overlay (i.e., if user deletes past beginning of the overlay region).
      (semantic-complete-inline-tag-engine): Initialize original start of
      `semantic-complete-inline-overlay'.
      
      * semantic/bovine/c.el (semantic-c-describe-environment): Update some
      section titles.  Test semanticdb table before printing it.
      (semantic-c-reset-preprocessor-symbol-map): Update
      `semantic-lex-spp-macro-symbol-obarray' outside the loop over all the
      files contributing to its value.
      (semantic-c-describe-environment): If there is an EDE project but no
      spp symbols from it, say so.
      
      * srecode/args.el (srecode-semantic-handle-:project): New argument
      handler. Provide variable values if not in an EDE project.
      
      * srecode/srt-mode.el (srecode-template-mode): Fix typo on srecode
      name.
      
      * srecode/cpp.el (srecode-semantic-handle-:c): Replace all characters
      in FILENAME_SYMBOL that aren't valid CPP symbol chars.
      
      * srecode/map.el (srecode-map-validate-file-for-mode): Force semantic
      to load if it is not active in the template being added to the map.
      
      * srecode/srt.el: Add local variables for setting the autoload file
      name.
      (srecode-semantic-handle-:srt): New autoload cookie
      
      * ede.el (ede-apply-preprocessor-map): Apply map to
      `semantic-lex-spp-project-macro-symbol-obarray' instead of the system
      one. Add require for semantic.
      
      * ede/proj-elisp.el (ede-update-version-in-source): In case a file has
      both a version variable and a Version: comment, always use
      `call-next-method'.
      
      * ede/cpp-root.el (ede-set-project-variables): Deleted.
      `ede-preprocessor-map' does the job this function was attempting to do
      with :spp-table.
      (ede-preprocessor-map): Update file tests to provide better messages.
      Do not try to get symbols from a file that is the file in the current
      buffer.
      
      * ede/base.el (ede-project-placeholder): Add more documentation to
      :file slot.
      (ede-load-cache): Use `insert-file-contents' instead of
      `find-file-noselect' in order to avoid activating other tools.
      
      * semantic/bovine/c.el (semantic-get-local-variables): Also add a new
      variable 'this' if we are in an inline member function.  For detecting
      this, we check overlays at point if there is a class spanning the
      current function.  Also, the variable 'this' has to be a pointer.
      
      * semantic/bovine/gcc.el (semantic-gcc-setup): Fail gracefully when
      querying g++ for defines returns an error.
      
      * srecode/srt-mode.el:
      * srecode/compile.el:
      * semantic/elp.el:
      * semantic/db-el.el:
      * semantic/complete.el:
      * ede.el:
      * cogre.el:
      * srecode/table.el:
      * srecode/mode.el:
      * srecode/insert.el:
      * srecode/compile.el:
      * semantic/decorate/include.el:
      * semantic/db.el:
      * semantic/adebug.el:
      * ede/auto.el:
      * srecode/dictionary.el:
      * semantic/ede-grammar.el:
      * semantic/db.el:
      * semantic/db-find.el:
      * semantic/db-file.el:
      * semantic/complete.el:
      * semantic/bovine/c.el:
      * semantic/analyze.el:
      * ede/util.el:
      * ede/proj.el:
      * ede/proj-elisp.el:
      * ede/pconf.el:
      * ede/locate.el:
      * ede.el: Adapt to EIEIO namespace cleanup: Rename `object-name' to
      `eieio-object-name', `object-set-name-string' to
      `eieio-object-set-name-string', `object-class' to
      `eieio-object-class', `class-parent' to `eieio-class-parent',
      `class-parents' to `eieio-class-parents', `class-children' to
      `eieio-class-children', `object-name-string' to
      `eieio-object-name-string', `object-class-fast' to
      `eieio--object-class'. Also replace direct access with new accessor
      functions.
      
      * ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix EDE
      file symbol to match rename.  Fix ede-cpp-root symbol to include
      -project in name.
      
      * cedet-files.el (cedet-files-list-recursively): New function.
      Recursively find files whose names are matching to given regex
      
      * ede.el (ede-current-project): Rewrite to avoid imperative style.
      
      * ede/files.el (ede-find-file): Simplify code.
      
      * ede/base.el (ede-normalize-file/directory): Add function to
      normalize :file or :directory slots if they are missing.
      
      * ede/cpp-root.el (ede-cpp-root-project): Add compile-command slot.
      (project-compile-project): Compiles project using value specified in
      :compule-command slot or in compile-command local variable.  Value of
      slot or local variable could be string or function that receives
      project and should return string that will be invoked as command.
      (project-compile-target): Invokes compilation of whole project
      
      * ede/files.el (ede-find-project-root): New function to find root of
      project that contains specific file.
      (ede-files-find-existing): New function which checks presence of given
      directory in the list of registered projects.
      
      etc/
      
      * srecode/ede-autoconf.srt: Change Copyright to FSF.
      (ede-empty): Change AC_INIT to use PROJECT_NAME, and PROJECT_VERSION.
      
      * srecode/ede-make.srt (ede-empty): Add a dependency on :project.  Add
      header comment specifying the project's relative path.
      
      * srecode/c.srt (header_guard): Upcase the filename symbol.
      
      * srecode/java.srt (empty-main): New.
      (class-tag): Decapitalize class.
      e8cc7880
  18. 18 Mar, 2013 1 commit
    • Paul Eggert's avatar
      Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9. · 19151a7f
      Paul Eggert authored
      * configure.ac (IMAGEMAGICK_MODULE): Reject 6.8.2.
      We want to reject 6.8.2-3 through 6.8.3-9, but there seems to be
      no way to do this in pkg-config, so make do with a reasonable
      approximation.
      * etc/PROBLEMS: Mention problem with ImageMagick 6.8.2-3 through 6.8.3-9.
      
      Fixes: debbugs:13867
      19151a7f
  19. 12 Mar, 2013 2 commits
    • Paul Eggert's avatar
      Add coding tags for iso-2022-7bit files that are not already tagged. · 5c592c9a
      Paul Eggert authored
      * HELLO, tutorials/TUTORIAL.ko, tutorials/TUTORIAL.th:
      Add coding tag.  For TUTORIAL.th this prevents Emacs from
      misinterpreting the file.
      5c592c9a
    • Paul Eggert's avatar
      Switch encodings of tutorials, thai-word to UTF-8. · cc725808
      Paul Eggert authored
      * etc/refcards/ru-refcard.tex:
      * etc/tutorials/TUTORIAL.bg, etc/tutorials/TUTORIAL.bg, etc/tutorials/TUTORIAL.cn:
      * etc/tutorials/TUTORIAL.cs, etc/tutorials/TUTORIAL.de, etc/tutorials/TUTORIAL.eo:
      * etc/tutorials/TUTORIAL.es, etc/tutorials/TUTORIAL.fr, etc/tutorials/TUTORIAL.it:
      * etc/tutorials/TUTORIAL.nl, etc/tutorials/TUTORIAL.pl, etc/tutorials/TUTORIAL.pt_BR:
      * etc/tutorials/TUTORIAL.ro, etc/tutorials/TUTORIAL.sk, etc/tutorials/TUTORIAL.sv:
      * etc/tutorials/TUTORIAL.zh:
      * lisp/language/thai-word.el:
      Switch to UTF-8.
      
      Fixes: debbugs:13880
      cc725808
  20. 11 Mar, 2013 1 commit
  21. 09 Mar, 2013 1 commit
  22. 05 Mar, 2013 1 commit
    • Paul Eggert's avatar
      FILE's lock is now always .#FILE and may be a regular file. · 70743157
      Paul Eggert authored
      * etc/NEWS: Document this.
      * nt/inc/unistd.h (O_NOFOLLOW): New macro.
      * src/filelock.c: Include <c-ctype.h>.
      (MAX_LFINFO): New top-level constant.
      (lock_info_type): Remove members pid, boot_time.  Add members at,
      dot, colon.  Change user member to be the entire buffer, not a
      pointer.  This allows us to handle the case where a foreign
      pid or boot time exceeds the local range.  All uses changed.
      (LINKS_MIGHT_NOT_WORK): New constant.
      (FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
      (defined_WINDOWSNT): Remove.
      (MAKE_LOCK_NAME, file_in_lock_file_name):
      Always use .#FILE (not .#-FILE) for the file lock,
      even if it is a regular file.
      (rename_lock_file): New function.
      (create_lock_file): Use it.
      (create_lock_file, read_lock_data):
      Prefer a symbolic link for the lock file, falling back on a
      regular file if symlinks don't work.  Do not try to create
      symlinks on MS-Windows, due to security hassles.  Stick with
      POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
      link, rename, unlink, mkstemp) when creating locks, as a GNUish
      host may be using a Windowsish file system, and cannot use
      MS-Windows-only system calls.  Fall back on mktemp if mkstemp
      doesn't work.  Don't fail merely because of a symlink-contents
      length limit in the current file system; fall back on regular
      files.  Increase the symlink contents length limit to 8 KiB, this
      should be big enough for any real use and doesn't crunch the
      stack.
      (create_lock_file, lock_file_1, read_lock_data):
      Simplify allocation of lock file buffers now that they fit in 8 KiB.
      (lock_file_1): Return error number, not bool.  All callers changed.
      (ELOOP): New macro, if not already defined.
      (read_lock_data): Return size of lock file contents, not Lisp object.
      All callers changed.  Handle a race condition if some other process
      replaces a regular-file lock with a symlink lock or vice versa,
      while we're trying to read the lock.
      (current_lock_owner): Parse contents more carefully, to help avoid
      confusing a regular-file lock with some other application's use
      of the file.  Check for lock file contents being too long, or
      not parsing correctly.
      (current_lock_owner, lock_file):
      Allow foreign pid and boot times that exceed the local range.
      (current_lock_owner, lock_if_free, lock_file):
      Simplify allocation of lock file contents.
      * src/w32.c (sys_rename_replace): New function, containing most of
      the contents of the old sys_rename.
      (sys_rename): Use it.
      (fchmod): New dummy function.
      * src/w32.h (sys_rename_replace, fchmod): New decls.
      
      Fixes: debbugs:13807
      70743157
  23. 03 Mar, 2013 1 commit
  24. 02 Mar, 2013 1 commit
    • Paul Eggert's avatar
      The lock for FILE is now .#FILE or .#-FILE. · b5029e23
      Paul Eggert authored
      The old approach, which fell back on DIR/.#FILE.0 through
      DIR/.#FILE.9, had race conditions that could not be easily fixed.
      If DIR/.#FILE is a non-symlink file, Emacs now does not create a
      lock file for DIR/FILE; that is, DIR/FILE is no longer partly
      protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
      because the locking mechanism was never reliable in that case).
      This patch fixes this and other bugs discovered by a code
      inspection that was prompted by
      <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>.
      Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
      to avoid interoperability problems between the MS-Windows and
      non-MS-Windows implementations.  MS-Windows and non-MS-Windows
      instances of Emacs now ignore each others' locks.
      * etc/NEWS: Document this.
      * src/filelock.c (defined_WINDOWSNT): New constant.
      (MAKE_LOCK_NAME, fill_in_lock_file_name):
      Don't create DIR/.#FILE.0 through DIR/.#FILE.9.  Instead, create
      DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
      regular files on MS-Windows hosts.
      (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
      Use SAFE_ALLOCA to avoid problems with long file names.
      (MAX_LFINFO): Now a local constant, not a global macro.
      (IS_LOCK_FILE): Remove.
      (lock_file_1): Don't inspect errno if symlink call succeeds;
      that's not portable.
      (lock_file): Document that this function can return if lock
      creation fails.
      
      Fixes: debbugs:13807
      b5029e23
  25. 01 Mar, 2013 1 commit
  26. 28 Feb, 2013 1 commit
  27. 27 Feb, 2013 1 commit
  28. 25 Feb, 2013 2 commits
    • Paul Eggert's avatar
      * NEWS: Document removal of --with-crt-dir. · aec32f66
      Paul Eggert authored
      aec32f66
    • Paul Eggert's avatar
      Simplify data_start configuration. · 1ddc2bd6
      Paul Eggert authored
      This is a followon simplification to the fix for Bug#13650.
      * admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove.
      * configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
      (LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
      (AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
      not always needed.
      (HAVE_DATA_START): New macro.
      * etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove.
      Remove legacy-systems section, as this stuff is no longer
      applicable with current linking strategies.
      * src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
      (START_FILES): Remove.  All uses removed.
      (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
      (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
      (buildobj.h): Use it.
      ($(ALLOBJS)): Depend on globals.h.
      (temacs$(EXEEXT)): Use $(ALLOBJS).
      * src/autodeps.mk (ALLOBJS): Move to Makefile.in.
      * src/deps.mk (vm-limit.o):
      * src/makefile.w32-in ($(BLD)/vm-limit.$(O)):
      Do not depend on mem-limits.h.
      * src/emacs.c (__do_global_ctors, __do_global_ctors_aux)
      (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
      [__GNUC__ && !ORDINARY_LINK]: Remove.
      * src/mem-limits.h, src/pre-crt0.c: Remove.
      * src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h.
      * src/unexcoff.c (etext): New decl.
      (make_hdr): Use it instead of start_of_data.
      * src/vm-limit.c: Move most of mem-limits.h's contents here.
      (data_start): New decl.  It's OK if this is approximate,
      so simplify-away some unnecessary exactness.
      (POINTER): Remove; all uses removed.
      (data_space_start): Now char *, to avoid casts.
      (exceeds_lisp_ptr): New function, replacing the old
      EXCEEDS_LISP_PTR macro.  All uses changed.
      (check_memory_limits): Simplify and remove casts.
      (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
      (memory_warnings): Use data_start instead of start_of_data.
      
      Fixes: debbugs:13783
      1ddc2bd6
  29. 19 Feb, 2013 1 commit
  30. 14 Feb, 2013 1 commit
  31. 11 Feb, 2013 1 commit