1. 08 Jan, 2015 2 commits
    • Stefan Monnier's avatar
      * emacs-lisp/eieio-generic.el: New file. · 54181569
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el: Move all generic function code to
      (eieio--defmethod): Declare.
      * lisp/emacs-lisp/eieio.el: Require eieio-generic.  Move all generic
      function code to eieio-generic.el.
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-generic): Move to
      * lisp/emacs-lisp/eieio-datadebug.el (eieio-debug-methodinvoke): Update call
      to eieio--generic-call.
      * lisp/emacs-lisp/eieio-base.el (eieio-instance-inheritor): Don't use
      <class>-child type.
      * test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
      Update reference to eieio--generic-call-key.
      * test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Don't use
    • Stefan Monnier's avatar
      lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var. · 1599688e
      Stefan Monnier authored
      * lisp/cedet/ede/speedbar.el (ede-speedbar-compile-line)
      * lisp/cedet/ede.el (ede-buffer-belongs-to-target-p)
      (ede-buffer-belongs-to-project-p, ede-build-forms-menu)
      * lisp/cedet/semantic/db-typecache.el (semanticdb-get-typecache):
      * lisp/cedet/semantic/db-file.el (semanticdb-load-database):
      * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag):
      * lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-load-helper):
      * lisp/cedet/ede/project-am.el (project-am-preferred-target-type):
      * lisp/cedet/ede/proj.el (ede-proj-load):
      * lisp/cedet/ede/custom.el (ede-customize-current-target, ede-customize-target):
      * lisp/cedet/semantic/ede-grammar.el ("semantic grammar"):
      * lisp/cedet/semantic/scope.el (semantic-scope-reset-cache)
      * lisp/cedet/srecode/map.el (srecode-map-update-map):
      * lisp/cedet/srecode/insert.el (srecode-insert-show-error-report)
      (srecode-insert-method, srecode-insert-include-lookup)
      * lisp/cedet/srecode/fields.el (srecode-active-template-region):
      * lisp/cedet/srecode/compile.el (srecode-flush-active-templates)
      (srecode-compile-inserter): Don't use <class> as a variable.
      Use `oref-default' for class slots.
      * lisp/cedet/semantic/grammar.el (semantic-grammar-eldoc-last-data): New var.
      (semantic-grammar-eldoc-get-macro-docstring): Use it instead of
      * lisp/cedet/semantic/fw.el (semantic-exit-on-input): Use `declare'.
      (semantic-throw-on-input): Use `with-current-buffer'.
      * lisp/cedet/semantic/db.el (semanticdb-abstract-table-list): Define if not
      * lisp/cedet/semantic/db-find.el (semanticdb-find-tags-collector):
      Use save-current-buffer.
      (semanticdb-find-tags-collector): Don't use <class> as a variable.
      * lisp/cedet/semantic/complete.el (semantic-complete-active-default)
      (semantic-complete-current-matched-tag): Declare.
      (semantic-complete-inline-custom-type): Don't use <class> as a variable.
      * lisp/cedet/semantic/bovine/make.el (semantic-analyze-possible-completions):
      Use with-current-buffer.
      * lisp/cedet/semantic.el (semantic-parser-warnings): Declare.
      * lisp/cedet/ede/base.el (ede-target-list): Define if not pre-defined.
      (ede-with-projectfile): Prefer find-file-noselect over
      * lisp/emacs-lisp/chart.el (chart-add-sequence, chart-bar-quickie):
      Don't use <class> as a variable.
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
      Improve error messages.
      (eieio-persistent-slot-type-is-class-p): Handle `list-of' types, as
      well as user-defined types.  Emit errors for legacy types like
      <class>-child and <class>-list, if not eieio-backward-compatibility.
      * lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var.
      (eieio-defclass-autoload): Obey it.
      (eieio--class-object): Improve error behavior.
      (eieio-class-children-fast, same-class-fast-p): Remove.  Inline at
      every use site.
      (eieio--defgeneric-form-primary-only): Rename from
      eieio-defgeneric-form-primary-only; update all callers.
      (eieio--defgeneric-form-primary-only-one): Rename from
      eieio-defgeneric-form-primary-only-one; update all callers.
      (eieio-defgeneric-reset-generic-form-primary-only-one): Remove.
      (eieio--method-optimize-primary): New function to replace them.
      (eieio--defmethod, eieio-defmethod): Use it.
      (eieio--perform-slot-validation): Rename from
      eieio-perform-slot-validation; update all callers.
      (eieio--validate-slot-value): Rename from eieio-validate-slot-value.
      Change `class' to be a class object.  Update all callers.
      (eieio--validate-class-slot-value): Rename from
      eieio-validate-class-slot-value.  Change `class' to be a class object.
      Update all callers.
      (eieio-oset-default): Accept class object as well.
      (eieio--generic-call-primary-only): Rename from
      eieio-generic-call-primary-only.  Update all callers.
      * lisp/emacs-lisp/eieio-opt.el (eieio-read-generic-p): Remove.
      (eieio-read-generic): Use `generic-p' instead.
      * lisp/emacs-lisp/eieio.el (same-class-p): Accept class object as well.
      (call-next-method): Simplify.
      (clone): Obey eieio-backward-compatibility.
      * lisp/gnus/registry.el: Don't use <class> as a variable.
      * test/automated/eieio-test-methodinvoke.el
      Don't use <class> as a variable.
      * test/automated/eieio-test-persist.el (persistent-with-objs-list-slot):
      Don't use <class>-list type.
      * test/automated/eieio-tests.el: Use cl-lib.  Don't use <class> as a variable.
      Don't use <class>-list types and <class>-list-p predicates.
  2. 05 Jan, 2015 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio*.el: Use class objects in `parent' field. · cb4db863
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (eieio-class-object): New function.
      (eieio-class-parents-fast): Remove macro.
      (eieio--class-option-assoc): Rename from class-option-assoc.
      Update all callers.
      (eieio--class-option): Rename from class-option.  Change `class' arg to
      be a class object.  Update all callers.
      (eieio--class-method-invocation-order): Rename from
      class-method-invocation-order.  Change `class' arg to be a class
      object.  Update all callers.
      (eieio-defclass-autoload, eieio-defclass): Set the `parent' field to
      a list of class objects rather than names.
      (eieio-defclass): Remove redundant quotes.  Use `eieio-oref-default'
      for accessors to class allocated slots.
      (eieio--perform-slot-validation-for-default): Rename from
      eieio-perform-slot-validation-for-default.  Update all callers.
      (eieio--add-new-slot): Rename from eieio-add-new-slot.
      Update all callers.  Use push.
      (eieio-copy-parents-into-subclass): Adjust to new content of
      `parent' field.  Use dolist.
      (eieio-oref): Remove support for providing a class rather than
      an object.
      (eieio-oref-default): Prefer class objects over class names.
      (eieio--slot-originating-class-p): Rename from
      eieio-slot-originating-class-p.  Update all callers.  Use `or'.
      (eieio--slot-name-index): Turn check into assertion.
      (eieio--class-slot-name-index): Rename from
      eieio-class-slot-name-index.  Change `class' arg to be a class object.
      Update all callers.
      (eieio-attribute-to-initarg): Move to eieio-test-persist.el.
      (eieio--c3-candidate): Rename from eieio-c3-candidate.
      Update all callers.
      (eieio--c3-merge-lists): Rename from eieio-c3-merge-lists.
      Update all callers.
      (eieio--class-precedence-c3): Rename from eieio-class-precedence-c3.
      Update all callers.
      (eieio--class-precedence-dfs): Rename from eieio-class-precedence-dfs.
      Update all callers.
      (eieio--class-precedence-bfs): Rename from eieio-class-precedence-bfs.
      Update all callers.  Adjust to new `parent' content.
      (eieio--class-precedence-list): Rename from -class-precedence-list.
      Update all callers.
      (eieio-generic-call): Use autoloadp and autoload-do-load.
      Slight simplification.
      (eieio-generic-call, eieio-generic-call-primary-only): Adjust to new
      return value of `eieio-generic-form'.
      (eieiomt-add): Index the hashtable with class objects rather than
      class names.
      (eieio-generic-form): Accept class objects as well.
      * lisp/emacs-lisp/eieio.el (eieio-class-parents): Accept class objects.
      (eieio--class-slot-initarg): Rename from class-slot-initarg.
      Change `class' arg to be a class object.  Update all callers.
      (call-next-method): Adjust to new return value of `eieio-generic-form'.
      (eieio-default-superclass): Set var to the class object.
      (eieio-edebug-prin1-to-string): Fix recursive call for lists.
      Change print behavior to affect class objects rather than
      class symbols.
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
      Adjust to new convention for eieio-persistent-validate/fix-slot-value.
      Change `class' arg to be a class object.  Update all callers.
      * test/automated/eieio-test-persist.el (eieio--attribute-to-initarg):
      Move from eieio-core.el.  Rename from eieio-attribute-to-initarg.
      Change arg to be a class object.  Update all callers.
      * test/automated/eieio-tests.el (eieio-test-04-static-method)
      (eieio-test-05-static-method-2): Use oref-default to access
      class slots.
      (eieio-test-23-inheritance-check): Don't assume that
      eieio-class-parents returns class names, or that a class can only have
      a single name.
  3. 29 Dec, 2014 1 commit
    • Stefan Monnier's avatar
      lisp/emacs-lisp/eieio*.el: Reduce object header to 1 slot · 232823a1
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (eieio--with-scoped-class): Use let-binding.
      (object): Remove first (constant) slot; rename second to `class-tag'.
      (eieio--object-class-object, eieio--object-class-name): New funs
      to replace eieio--object-class.
      (eieio--class-object, eieio--class-p): New functions.
      (same-class-fast-p): Make it a defsubst, change its implementation
      to check the class objects rather than their names.
      (eieio-object-p): Rewrite.
      (eieio-defclass): Adjust the object initialization according to the new
      object layout.
      (eieio--scoped-class): Declare it returns a class object (not a class
      name any more).  Adjust calls accordingly (along with calls to
      (eieio--slot-name-index): Rename from eieio-slot-name-index and change
      its class arg to be a class object.  Adjust callers accordingly.
      (eieio-slot-originating-class-p): Make its start-class arg a class
      object.  Adjust all callers.
      (eieio--initarg-to-attribute): Rename from eieio-initarg-to-attribute.
      Make its `class' arg a class object.  Adjust all callers.
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
      Use eieio--slot-name-index rather than eieio-slot-name-index.
      * lisp/emacs-lisp/eieio.el (child-of-class-p): Make it accept class objects
      additionally to class names.
      * test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
      Adjust to new semantics of eieio--scoped-class.
      (eieio-test-match): Improve error feedback.
  4. 23 Dec, 2014 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio*.el: Remove "name" field of objects · ee93d7ad
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-base.el (clone) <eieio-instance-inheritor>:
      Use call-next-method.
      (eieio-constructor): Rename from `constructor'.
      (eieio-persistent-convert-list-to-object): Drop objname.
      (eieio-persistent-validate/fix-slot-value): Don't hardcode
      (eieio-named): Use a normal slot.
      (slot-missing) <eieio-named>: Remove.
      (eieio-object-name-string, eieio-object-set-name-string, clone)
      <eieio-named>: New methods.
      * lisp/emacs-lisp/eieio-core.el (eieio--defalias): Follow aliases.
      (eieio--object): Remove `name' field.
      (eieio-defclass): Adjust to new convention where constructors don't
      take an "object name" any more.
      (eieio--defgeneric-init-form, eieio--defmethod): Follow aliases.
      (eieio-validate-slot-value, eieio-oset-default)
      (eieio-slot-name-index): Don't hardcode eieio--object-num-slots.
      (eieio-generic-call-primary-only): Simplify.
      * lisp/emacs-lisp/eieio-custom.el (eieio-widget-test): Remove dummy arg.
      (eieio-object-value-get): Use eieio-object-set-name-string.
      * lisp/emacs-lisp/eieio.el (make-instance): Simplify by not adding an object
      name argument.
      (eieio-object-name): Use eieio-object-name-string.
      (eieio--object-names): New const.
      (eieio-object-name-string, eieio-object-set-name-string): Re-implement
      using a hashtable rather than a built-in slot.
      (eieio-constructor): Rename from `constructor'.  Remove `newname' arg.
      (clone): Don't mess with the object's "name".
      * test/automated/eieio-test-persist.el (persistent-with-objs-slot-subs):
      The type FOO-child is the same as FOO.
      * test/automated/eieio-tests.el: Remove dummy object names.
  5. 22 Dec, 2014 9 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio-core.el (eieio--class-v): Rename from class-v. · d4a12e7a
      Stefan Monnier authored
      (method-*): Add a "eieio--" prefix to those constants.
      * lisp/emacs-lisp/eieio-speedbar.el: Use lexical-binding.
      * lisp/emacs-lisp/eieio.el: Move edebug specs to the corresponding macro.
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/eieio*.el: Use hashtables rather than obarrays · bcebc831
      Stefan Monnier authored
      * lisp/emacs-lisp/eieio-core.el (class): Rename field symbol-obarray to
      symbol-hashtable.  It contains a hashtable instead of an obarray.
      (generic-p): Use symbol property `eieio-method-hashtable' instead of
      (generic-primary-only-p, generic-primary-only-one-p):
      Slight optimization.
      (eieio-defclass-autoload-map): Use a hashtable instead of an obarray.
      (eieio-defclass-autoload, eieio-defclass): Adjust/simplify accordingly.
      (eieio-class-un-autoload): Use autoload-do-load.
      (eieio-defclass): Use dolist, cl-pushnew, cl-callf.
      Use new cl-deftype-satisfies.  Adjust to use of hashtables.
      Don't hardcode the value of eieio--object-num-slots.
      (eieio-defgeneric-form-primary-only-one): Remove `doc-string' arg.
      Use a closure rather than a backquoted lambda.
      (eieio--defmethod): Adjust call accordingly.  Set doc-string via the
      function-documentation property.
      (eieio-slot-originating-class-p, eieio-slot-name-index)
      (eieiomt--optimizing-hashtable, eieiomt-install, eieiomt-add)
      (eieio-generic-form): Adjust to use of hashtables.
      (eieiomt--sym-optimize): Rename from eieiomt-sym-optimize; take
      additional class argument.
      (eieio-generic-call-methodname): Remove, unused.
      * lisp/emacs-lisp/eieio-custom.el: Use lexical-binding.
      (eieio-object-value-to-abstract): Simplify.
      * lisp/emacs-lisp/eieio-datadebug.el: Use lexical-binding.
      * lisp/emacs-lisp/eieio-opt.el (eieio-build-class-list): Use cl-mapcan.
      (eieio-build-class-alist): Use dolist.
      (eieio-all-generic-functions): Adjust to use of hashtables.
      * lisp/emacs-lisp/eieio.el (child-of-class-p): Fix case where `class' is
      * test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
      Remove use of eieio-generic-call-methodname.
      (eieio-test-method-order-list-3, eieio-test-method-order-list-6)
      (eieio-test-method-order-list-7, eieio-test-method-order-list-8):
      Adjust the expected result accordingly.
      * lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
      Prefer \' to $.
    • Stefan Monnier's avatar
      * lisp/cedet: Reduce reliance on EIEIO internals. · b11d8924
      Stefan Monnier authored
      * lisp/cedet/ede/generic.el (ede-find-target): Prefer \` and \' to ^ and $.
      * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag): Prefer find-class over
      * lisp/cedet/semantic/db.el (semanticdb-cache-get): Prefer eieio-object-class over
      * lisp/cedet/srecode/srt-mode.el (srecode-macro-help): Use eieio-class-children.
    • Stefan Monnier's avatar
      * lisp/completion.el: Use post-self-insert-hook. · b366b3bb
      Stefan Monnier authored
      Fixes: debbugs:19400
      (completion-separator-self-insert-autofilling): Remove.
      (completion-separator-chars): New var.
      (completion-c-mode-hook, completion-setup-fortran-mode): Use it instead
      of changing the keymap.
      (completion--post-self-insert): New function.
      (dynamic-completion-mode): Use it instead of rebinding keys.
      (cmpl--completion-string): Rename from completion-string.
      (add-completion-to-head, delete-completion): Let-bind it explicitly.
    • Bozhidar Batsov's avatar
      Simplify ruby--string-region · fafba80d
      Bozhidar Batsov authored
      * progmodes/ruby-mode.el (ruby--string-region): Simplify code
      by leveraging `syntax-ppss'.
    • Artur Malabarba's avatar
    • Jan D's avatar
      Fix setting icon for Gtk+ on non-initial frame. · 6f3f6050
      Jan D authored
      Fixes: debbugs:19403
      * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which
      breaks icon setting for Gtk+ except for initial frame.
    • Paul Eggert's avatar
      Remove obsolete references to pre-C99 builds · 4dc78f64
      Paul Eggert authored
      * doc/lispref/internals.texi (C Integer Types):
      Don't mention pre-C99 compilers.
    • Paul Eggert's avatar
      Use bool for boolean in xterm.c · 455e5469
      Paul Eggert authored
      * frame.h, nsterm.m, w32term.c, w32term.h, xterm.c:
      (x_set_window_size, x_bitmap_icon):
      * nsterm.m (ns_frame_raise_lower, x_new_font):
      * termhooks.h (struct terminal.toggle_invisible_pointer_hook)
      (struct terminal.frame_raise_lower_hook):
      * w32term.c (w32_frame_raise_lower):
      * xterm.c, xterm.h (x_text_icon):
      * xterm.c (x_update_window_begin, x_update_window_end)
      (x_update_end, x_after_update_window_line)
      (x_set_glyph_string_gc, x_draw_glyph_string_background)
      (x_alloc_lighter_color, x_draw_relief_rect)
      (x_draw_glyph_string_box, x_draw_image_relief)
      (x_draw_image_glyph_string, x_draw_stretch_glyph_string)
      (x_draw_underwave, x_draw_glyph_string, x_show_hourglass)
      (XFillRectangle) [HAVE_GTK3]:
      (XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight)
      (x_focus_changed, x_find_modifier_meanings, note_mouse_movement)
      (XTmouse_position, xt_action_hook, xt_horizontal_action_hook)
      (x_send_scroll_bar_event, xm_scroll_callback)
      (xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
      (x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create)
      (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
      (XTset_horizontal_scroll_bar, x_scroll_bar_expose)
      (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
      (x_horizontal_scroll_bar_report_motion, x_net_wm_state)
      (handle_one_xevent, XTread_socket, x_draw_bar_cursor)
      (x_draw_window_cursor, x_clear_errors)
      (x_trace_wire, x_new_font, x_set_offset, wm_supports)
      (set_wm_state, x_set_sticky, get_current_wm_state)
      (do_ewmh_fullscreen, x_handle_net_wm_state)
      (x_check_expected_move, x_sync_with_move, x_wait_for_event)
      (x_set_window_size_1, XTframe_raise_lower)
      (x_make_frame_visible, x_iconify_frame)
      (x_timeout_atimer_activated_flag, same_x_server, x_display_ok)
      (x_term_init, x_process_timeouts, x_activate_timeout_atimer)
      (x_delete_terminal, x_initialize, syms_of_xterm):
      Use bool for boolean.
  6. 21 Dec, 2014 1 commit
  7. 20 Dec, 2014 6 commits
  8. 19 Dec, 2014 8 commits
    • Paul Eggert's avatar
    • Artur Malabarba's avatar
      * let-alist.el (let-alist): Enable access to deeper alists · f447d33f
      Artur Malabarba authored
      Acces them by using extra dots inside the dotted symbols.
    • Alan Mackenzie's avatar
      Make C++11 uniform init syntax work. New keywords "final" and "override" · 948fa912
      Alan Mackenzie authored
      cc-engine.el (c-back-over-member-initializer-braces): New function.
      (c-guess-basic-syntax): Set `containing-sex' and `lim' using the new
      cc-fonts.el (c-font-lock-declarations): Check more carefully for "are we
      at a declarator?" using c-back-over-member-initializers.
      cc-langs.el (c-type-modifier-kwds): include "final" and "override" in
      C++ value.
    • Martin Rudalics's avatar
      In `ispell-command-loop' don't use `next-window'. · 164cdfbf
      Martin Rudalics authored
      * textmodes/ispell.el (ispell-command-loop): Don't use
    • Artur Malabarba's avatar
    • Martin Rudalics's avatar
    • Martin Rudalics's avatar
      Describe window size preserving options. · 276bd75c
      Martin Rudalics authored
      * windows.texi (Resizing Windows): Describe new argument of
      `fit-window-to-buffer'.  Move description of `window-size-fixed'
      to new section below.
      (Preserving Window Sizes): New section describing
      `window-size-fixed' and `window-preserve-size'.
      (Display Action Functions): Describe `preserve-size' alist
      (Window Parameters): Describe `preserved-size' parameter.
    • Paul Eggert's avatar
      Minor cleanups for Lisp objects and symbols · ad013ba6
      Paul Eggert authored
      * alloc.c (next_vector, set_next_vector):
      * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
      (lisp_h_make_number) [USE_LSB_TAG]:
      Use Lisp_Int0 instead of the mystery constant 0.
      * alloc.c (mark_object): Always set and use po; that's simpler.
      Properly parenthesize definientia.
      * bidi.c (bidi_initialize):
      * buffer.c (init_buffer_once):
      * nsfns.m (syms_of_nsfns):
      * nsmenu.m (syms_of_nsmenu):
      * nsselect.m (syms_of_nsselect):
      Prefer DEFSYM to defining by hand.
      * data.c: Fix too-long line.
      * lisp.h (DECLARE_GDB_SYM): New macro.
      Declare the symbol, so it's visible to everywhere lisp.h is included.
      Move forward decls as far forward as they can go,
      to allow future changes to use them.
  9. 18 Dec, 2014 11 commits