1. 20 Nov, 2015 7 commits
    • Eli Zaretskii's avatar
      Improve MS-Windows implementation in dynlib.c · 24be1c84
      Eli Zaretskii authored
      * src/dynlib.c [WINDOWSNT]: Include errno.h, lisp.h, and w32.h.
      No need to include windows.h, as w32.h already does that.
      <dynlib_last_err>: New static variable.
      (dynlib_reset_last_error): New function.
      (dynlib_open): Convert forward slashes to backslashes.  Convert
      file names from UTF-8 to either UTF-16 or the current ANSI
      codepage, and call either LoadLibraryW or LoadLibraryA.  If the
      argument is NULL, return a handle to the main module, like
      'dlopen' does.  Record the error, if any, for use by dynlib_error.
      (dynlib_sym): Check the handle for validity. Record the error, if
      any, for use by dynlib_error.
      (dynlib_error): Call w32_strerror to produce the error string, and
      zero out the last error code, like dlerror does.
      (dynlib_close): Check the handle for validity.  Record the error,
      if any, for use by dynlib_error.  Don't call FreeLibrary with a
      handle for the main module.
      * src/w32.c (globals_of_w32): Call dynlib_reset_last_error.
      24be1c84
    • Eli Zaretskii's avatar
      ; Update the description of Windows 10 pinned icon issue · bd715e3d
      Eli Zaretskii authored
      * etc/PROBLEMS: Mention that the issue was fixed in later
      Windows 10 builds.
      bd715e3d
    • Paul Eggert's avatar
      Include-file tweaks for modules · c69cec40
      Paul Eggert authored
      * src/dynlib.c, src/emacs-module.c: Include <config.h> first.
      * src/dynlib.h: Do not include config.h.
      It’s every .c file’s responsibility to include config.h first.
      * src/emacs-module.c: Include emacs-module.h immediately after
      config.h, to test that emacs-module.h doesn’t depend on
      include files other than config.h.
      c69cec40
    • Paul Eggert's avatar
      Simplify push_handler and profile its malloc · aa7dac89
      Paul Eggert authored
      * src/lisp.h (PUSH_HANDLER): Remove.
      All callers changed to use push_handler directly.
      * src/eval.c (internal_condition_case)
      (internal_condition_case_1, internal_condition_case_2)
      (internal_condition_case_n):
      Use same pattern as for other invokers of push_handler.
      (push_handler, push_handler_nosignal): Use call-by-value
      instead of call-by-reference.  All uses changed.
      (push_handler): Simplify by rewriting in terms of
      push_handler_nosignal.
      (push_handler_nosignal): Profile any newly allocated memory.
      aa7dac89
    • Paul Eggert's avatar
      de67fa42
    • Juanma Barranquero's avatar
      Discover repository version in linked worktrees (bug#21930) · c210b8b1
      Juanma Barranquero authored
      * lisp/version.el (emacs-repository--version-git-1): Do not assume
      HEAD is at .git/HEAD, it can also be at .git/worktrees/<branch>/HEAD.
      (emacs-repository-get-version): Grok linked worktrees when EXTERNAL
      is nil too.
      c210b8b1
    • Juri Linkov's avatar
      * lisp/replace.el (occur-regexp-descr): New function. · 32845e3a
      Juri Linkov authored
      (occur-1, occur-engine): Use it.
      
      * lisp/isearch.el (isearch-occur): Propertize regexp with
      isearch-string and isearch-regexp-function-descr for
      occur-regexp-descr to display the correct description
      message in the header (bug#21176, bug#21180).
      32845e3a
  2. 19 Nov, 2015 17 commits
    • Karl Fogel's avatar
      Revert `open-line' electric-indent sensitivity · c5935389
      Karl Fogel authored
      * lisp/simple.el (open-line): Remove electric indent code.
        (electric-indent-just-newline): Don't declare.
      
      * test/automated/simple-test.el (open-line-indent): Adjust test.
      
      This partly reverts Artur Malabarba's change that added electric
      indent sensitivity to `open-line' (Oct 24 22:26:27 2015 +0100, git
      commit bd4f04f8), and adjusts a new test he added right afterwards
      (Sat Oct 24 23:43:06 2015 +0100, git commit 207f235e) accordingly.
      However, the new INTERACTIVE argument to `open-line', which he also
      added in the first commit, is not reverted here.
      
      See the thread "Questioning the new behavior of `open-line'." on the
      Emacs Devel mailing list, and in particular this message:
      
        From: Artur Malabarba
        Subject: Re: Questioning the new behavior of `open-line'.
        To: Karl Fogel
        Cc: David Kastrup, Pierpaolo Bernardi, emacs-devel
        Date: Wed, 18 Nov 2015 21:03:58 +0000
        Message-ID: \
          <CAAdUY-KN06pvCMy5bt3+Buk3yeKjf6n9iB2FaSTTOPpCqPwyhA@mail.gmail.com>
      
        https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01707.html
      c5935389
    • Paul Eggert's avatar
      Omit unnecessary clear in Fmodule_load · d81b0e13
      Paul Eggert authored
      * src/emacs-module.c (Fmodule_load):
      Simplify and avoid unnecessary initialization of priv member to 0.
      
      * src/emacs-module.c: (module_vec_set, module_vec_get, module_vec_size)
      d81b0e13
    • Paul Eggert's avatar
      Prefer signed integer types in module code · 92949781
      Paul Eggert authored
      Generally speaking, at the C level the Emacs source code prefers
      signed types like ‘ptrdiff_t’ to unsigned types like ‘size_t’,
      partly to avoid the usual signedness confusion when comparing values.
      Change the module API to follow this convention.
      Use ‘int’ for small values that can’t exceed INT_MAX.
      * modules/mod-test/mod-test.c (Fmod_test_globref_make)
      (Fmod_test_string_a_to_b, Fmod_test_vector_fill)
      (Fmod_test_vector_eq):
      * src/emacs-module.c (struct emacs_value_frame)
      (module_make_global_ref, module_free_global_ref)
      (module_copy_string_contents, module_make_string)
      (module_vec_set, module_vec_get, module_vec_size):
      * src/emacs-module.h (struct emacs_runtime, struct emacs_env_25):
      * src/lread.c (suffix_p):
      Prefer signed to unsigned integer types.
      92949781
    • Paul Eggert's avatar
      Omit ‘const’ on locals · d9b300af
      Paul Eggert authored
      Remove ‘const’ qualifier from locals that were newly added.
      We don’t normally bother declaring locals with ‘const’ even
      though they are not modified, for the same reason we don’t
      bother declaring them with ‘register’ even though their
      addresses are not taken; the advantage in compile-time
      checking isn’t worth the loss of readability.
      * modules/mod-test/mod-test.c (Fmod_test_non_local_exit_funcall)
      (Fmod_test_vector_fill, Fmod_test_vector_eq):
      * src/emacs-module.c (MODULE_SETJMP_1)
      (module_make_global_ref, module_free_global_ref)
      (module_non_local_exit_get, module_make_function)
      (module_extract_integer, module_extract_float)
      (module_get_user_ptr, module_set_user_ptr)
      (module_get_user_finalizer, module_set_user_finalizer)
      (module_vec_get, Fmodule_call)
      (module_non_local_exit_signal_1)
      (module_non_local_exit_throw_1, lisp_to_value)
      (finalize_storage, allocate_emacs_value, mark_modules)
      (module_handle_signal, module_handle_throw)
      (module_format_fun_env):
      * src/eval.c (push_handler, push_handler_nosignal)
      (init_handler):
      * src/lread.c (suffix_p):
      Omit unnecessary ‘const’.
      d9b300af
    • Paul Eggert's avatar
      Prefer intmax_t to int64_t in module code · 68d58e69
      Paul Eggert authored
      * modules/mod-test/mod-test.c (sum, Fmod_test_sum):
      * src/emacs-module.c (module_extract_integer)
      (module_make_integer):
      * src/emacs-module.h (struct emacs_env_25):
      Prefer intmax_t to int64_t.  This doesn’t change the generated
      code on any of the machines Emacs currently ports to, but it’s
      at least in theory more future-proof as C99 doesn’t guarantee
      that int64_t exists.
      68d58e69
    • Paul Eggert's avatar
      Rename module.c to emacs-module.c, etc. · f2c00259
      Paul Eggert authored
      * src/emacs-module.c: Rename from src/module.c.
      * src/emacs-module.h: Rename from src/module.h.
      All uses changed.
      f2c00259
    • Paul Eggert's avatar
      Fix minor module problems found by static checking · 62d787ed
      Paul Eggert authored
      * src/dynlib.c (dynlib_close): #ifdef out for now, as it’s not used.
      * src/eval.c, src/lisp.h (lisp_eval_depth): Now static.
      * src/module.c (Fmodule_load): Fix pointer signedness bug.
      (Fmodule_call): Tell GCC that the default case is unreachable.
      62d787ed
    • Paul Eggert's avatar
      Style fixes for indenting etc. in module code · c8a972b0
      Paul Eggert authored
      This is mostly indenting and spacing changes.  Also, remove
      some unnecessary static decls instead of bothering to reindent them.
      * src/module.h (EMACS_EXTERN_C_BEGIN): Remove, and do this inline,
      as most other Emacs files do for this sort of thing.
      c8a972b0
    • Eli Zaretskii's avatar
      Minor improvements in modules testing Makefile · 7cd728c8
      Eli Zaretskii authored
      * modules/mod-test/Makefile (EMACS, SO): New variables.
      (CFLAGS): When SO = dll, don't use -fPIC.
      (check): New target, runs the test.
      7cd728c8
    • Eli Zaretskii's avatar
      * .gitignore: Add "*.dll". · d4869dde
      Eli Zaretskii authored
      d4869dde
    • Paul Eggert's avatar
      Migrate modules/.gitignore into .gitignore · ca3bc790
      Paul Eggert authored
      * .gitignore: Add former contents of modules/.gitignore.
      * modules/.gitignore: Remove.
      ca3bc790
    • Paul Eggert's avatar
      Add copyright notices to module code · c8404f48
      Paul Eggert authored
      Put them in the usual format for GNU Emacs copyright notices.
      c8404f48
    • Paul Eggert's avatar
      Rename emacs_module.h to module.h · 80f19fb8
      Paul Eggert authored
      * src/module.h: Rename from src/emacs_module.h.
      All uses changed.
      80f19fb8
    • Juanma Barranquero's avatar
    • Juanma Barranquero's avatar
    • Alan Mackenzie's avatar
    • Dmitry Gutov's avatar
      Prioritize looking inside vc-parent-buffer over log-view-mode fallback · 3c5989da
      Dmitry Gutov authored
      * lisp/vc/vc.el (vc-deduce-fileset): Prioritize looking inside
      vc-parent-buffer over log-view-mode fallback (bug#21955).
      3c5989da
  3. 18 Nov, 2015 16 commits