1. 28 Jan, 2018 8 commits
    • Philipp Stephani's avatar
      Test that module functions are functions. · d0733704
      Philipp Stephani authored
      * test/src/emacs-module-tests.el (module-function-object): Verify that
      a module function is treated as a function.
      d0733704
    • Philipp Stephani's avatar
    • Philipp Stephani's avatar
      Prevent name clashes between CL structures and builtin types · 9a747b35
      Philipp Stephani authored
      * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't allow
      structures with the same names as builtin types.
      (cl--typeof-types, cl--all-builtin-types): Move from cl-generic.el and
      rename.
      (cl--struct-name-p): New helper function.
      
      * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't allow structures
      with the same names as builtin types.
      
      * lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-generalizer)
      (cl-generic-generalizers): Adapt to name change.
      
      * test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/builtin-type):
      * test/lisp/emacs-lisp/cl-preloaded-tests.el
      (cl-struct-define/builtin-type): New unit tests.
      
      * etc/NEWS: Document changed behavior.
      9a747b35
    • Alan Mackenzie's avatar
      Fix some errors in c-display-defun-name when the type is "struct {..}", etc. · a718e159
      Alan Mackenzie authored
      Also fix some errors with c-display-defun-name when there are nested classes.
      
      * lisp/progmodes/cc-cmds.el (c-in-function-trailer-p): Deal with a struct {..}
      being merely the type of a function.
      (c-where-wrt-brace-construct): Deal with a struct {..} being merely the type
      of a function.  Rearrange the order of some Lisp forms.  Insert a check for
      c-protection-key ("private", etc.) alongside the checking for a label.
      (c-defun-name-1): New function extracted form c-defun-name, which works within
      the existing restriction.  Don't regard 'at-function-end as being within the
      defun any more.  Recognize "struct", etc., with the new
      c-defun-type-name-decl-key rather than c-type-prefix-key.  Make the
      recognition of a normal function more accurate.
      (c-defun-name): Part left after extracting the above function.  It now just
      widens and calls c-defun-name-1.
      (c-declaration-limits-1): New function extracted from c-declaration-limits,
      which works within the existing restriction.  Move LIM back one block to
      account for the possibility of struct {..} as a function type.  Check we're
      not inside a declaration without braces.
      (c-declaration-limits): Part left after extracting the above function.  It now
      just narrows to an enclosing decl block and calls c-declaration-limits-1.
      (c-defun-name-and-limits): New function which identifies the name and limits
      of the most nested enclosing declaration or macro.
      (c-display-defun-name): Use c-defun-name-and-limits rather than two separate
      functions (which didn't always agree on which function).
      
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): If we have struct
      {..} as the type of a function, go back over this, too.
      
      * lisp/progmodes/cc-langs.el (c-defun-type-name-decl-kwds)
      (c-defun-type-name-decl-key): New lang const/var.
      a718e159
    • Noam Postavsky's avatar
      Fix round tripping of read->print for symbols with strange quotes · 36c8128e
      Noam Postavsky authored
      Since 2017-07-22 "Signal error for symbol names with strange
      quotes (Bug#2967)", symbol names beginning with certain quote
      characters require an escaping backslash.  However, the corresponding
      change for printing missed, so that (eq (read (prin1-to-string SYM))
      SYM) does not give `t' for such symbols.
      * src/character.c (confusable_symbol_character_p): New function,
      extracted from test `read1'.
      * src/lread.c (read1): Use it.
      * src/print.c (print_object): Use it to print a backslash for symbols
      starting with characters that `read1' requires to be escaped.
      * test/src/print-tests.el (print-read-roundtrip): New test.
      * etc/NEWS.26:
      * etc/NEWS: Clarify the announcement for the earlier reader
      change (Bug#30217).
      36c8128e
    • Simen Heggestøyl's avatar
      Shorten CSS hex colors when possible · 69a30e8b
      Simen Heggestøyl authored
      * lisp/textmodes/css-mode.el (css--format-hex): New function for
      shortening CSS hex colors when possible.
      (css--named-color-to-hex, css--rgb-to-named-color-or-hex): Use it.
      
      * test/lisp/textmodes/css-mode-tests.el (css-test-format-hex): New
      tests for 'css--format-hex'.
      (css-test-named-color-to-hex, css-test-cycle-color-format): Adjust for
      the changes to 'css--named-color-to-hex' and
      'css--rgb-to-named-color-or-hex'.
      69a30e8b
    • Simen Heggestøyl's avatar
      Fix off-by-one error in 'css--hex-to-rgb' · 97defdfc
      Simen Heggestøyl authored
      * lisp/textmodes/css-mode.el (css--hex-to-rgb): Fix off-by-one error.
      
      * test/lisp/textmodes/css-mode-tests.el (css-test-hex-to-rgb): Add
      regression tests for the above fix.
      97defdfc
    • tino calancha's avatar
      Code refactoring assoc-delete-all assq-delete-all · 9824885f
      tino calancha authored
      * lisp/subr.el (assoc-delete-all): Add optional arg TEST.
      (assq-delete-all): Use assoc-delete-all.
      
      * test/lisp/subr-tests.el (subr-tests--assoc-delete-all)
      (subr-tests--assq-delete-all): New tests.
      
      * doc/lispref/lists.texi (Association Lists): Document
      assoc-delete-all in the manual.
      
      ; * etc/NEWS: Announce assoc-delete-all.
      9824885f
  2. 27 Jan, 2018 13 commits
  3. 26 Jan, 2018 10 commits
  4. 25 Jan, 2018 4 commits
    • Juri Linkov's avatar
      * lisp/arc-mode.el (archive-extract): Let-bind `create-lockfiles' to nil · 2e777582
      Juri Linkov authored
      to prevent directory time modification by lock_file on visiting
      a file from archive.  (Bug#30215)
      (archive-summarize): Let-bind `create-lockfiles' to nil
      instead of `buffer-file-truename'.
      2e777582
    • Stefan Monnier's avatar
      Replace (default-value 'enable-multibyte-characters) with t · 9107cf30
      Stefan Monnier authored
      Since Emacs-24, (default-value 'enable-multibyte-characters) can't be
      changed any more, so we can remove all code which checks this value.
      
      * lisp/x-dnd.el (x-dnd-handle-file-name):
      * lisp/w32-fns.el (w32-set-default-process-coding-system):
      * lisp/textmodes/ispell.el (ispell-send-string):
      * lisp/term/internal.el (dos-codepage-setup):
      * lisp/tar-mode.el (tar-header-block-tokenize, tar--extract):
      * lisp/startup.el (command-line):
      * lisp/server.el (server-process-filter):
      * lisp/net/browse-url.el (browse-url-file-url):
      * lisp/menu-bar.el (menu-bar-options-menu, menu-bar-describe-menu):
      * lisp/mail/sendmail.el (mail-setup):
      * lisp/mail/rmail.el (rmail-mode, rmail-get-new-mail):
      * lisp/mail/rfc2047.el (rfc2047-encode-message-header):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      * lisp/international/mule-diag.el (mule-diag):
      * lisp/files.el (find-file-noselect-1):
      * lisp/dos-fns.el (dos-set-default-process-coding-system):
      * lisp/arc-mode.el (archive-mode):
      * lisp/international/mule-cmds.el (mule-menu-keymap)
      (set-default-coding-systems, set-language-info)
      (set-language-environment, standard-display-european-internal)
      (set-locale-environment): Simplify code.
      9107cf30
    • Michael Albinus's avatar
      * lisp/simple.el (shell-command-to-string): · f44b50ff
      Michael Albinus authored
      Call `shell-command' in order to respect file name handlers.
      f44b50ff
    • Michael Albinus's avatar
      421e2fb7
  5. 24 Jan, 2018 5 commits