Commit Graph

18 Commits

Author SHA1 Message Date
5531d7115a Fix indentation for many autodef setters 2018-06-22 01:49:21 +02:00
8c5deef5fc Fix unintern calls (missing second argument) 2018-06-22 01:49:21 +02:00
bc87ccf894 Refactor set-company-backend! & revise docstring 2018-06-22 01:49:19 +02:00
aa4c9744f8 Fix set-company-backends! & update docstring
+ It wasn't preserving insertion order of multiple backends
+ It failed when BACKENDS = nil (supposed to unset mode backends)
+ Use eq/equal as a test-fn conditionally (glorious, glorious premature
  optimization)
2018-06-20 19:44:08 +02:00
746d90c330 make-variable-buffer-local -> make-local-variable
It is more correct to use the latter.
2018-06-19 13:49:18 +02:00
97b42c449b Allow set-company-backend! to unset backends
Passing nil as its second argument will unset previously set backends.
2018-06-17 21:40:32 +02:00
17981d6a61 Conform hook names to conventions
Also minor reformatting & comment corrections.
2018-06-17 02:25:12 +02:00
3ad16f660f Refactor set-company-backend! 2018-06-16 12:46:57 +02:00
f81a0e6f41 Remove redundant def-setting! docstrings
def-setting! will now grab the autodef's docstring if it has an
:obsolete property defined.
2018-06-15 16:54:39 +02:00
d8b1e469bc Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
80bd587d87 Move :company-backend setting to autoload.el
This decouples the company module from module load-order.
2018-06-01 14:54:13 +02:00
5e49239ff2 Give feedback on +company/toggle-auto-completion 2018-05-31 15:59:52 +02:00
5b31fd9505 Use company-dabbrev-code in prog-modes & company-dabbrev everywhere else 2018-05-28 00:08:14 +02:00
3488821b2e completion/company: minor quoting refactor
Sharp-quote function and use backquotes in pcase (better Emacs <25
compatibility).
2018-05-08 17:57:27 +02:00
b488e4085f completion/company: add +company/toggle-auto-completion command 2018-02-02 20:47:32 -05:00
9b47d987aa Add +company/dabbrev-code-previous 2017-06-09 01:09:20 +02:00
c7254e7bdc Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
2b027c0052 Add modules/completion/company 2017-02-20 00:26:08 -05:00