Commit Graph

50 Commits

Author SHA1 Message Date
Henrik Lissner
fbce94cd20
Remove select-enable-{clipboard,primary} #1008
select-enable-clipboard is already `t` by default and
select-enable-primary disturbs non-evil yanking behavior.
2019-02-28 03:21:40 -05:00
Henrik Lissner
fed0a51f9e
Fix ns-auto-titlebar not correctly being activated
Makes +doom|determine-ns-appearance redundant.
2019-02-25 00:26:31 -05:00
Henrik Lissner
4aaeeb509c
Auto-determine ns-appearance parameter on MacOS
This is experimental. It will adapt the frame titlebar's theme depending
on the background of the loaded theme.
2019-02-24 13:57:01 -05:00
Henrik Lissner
f264a9bc6e
Back to command = super, option = meta on MacOS
On MacOS, command used to be 'meta, which Emacs (and many packages) use
for many keybinds. I don't want to pollute the command key, so it is now
meta (as is the Emacs default).

The MacOS keybind fixes have been moved back to super.
2019-01-22 19:29:13 -05:00
Henrik Lissner
b56639e31b
Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
Henrik Lissner
6d10b9bbdf
Revert to Meta, instead of Super
Using meta is a little more flexible. Since there is no dedicated meta
key on our keyboards (anymore), it can be remapped to another modifier
by changing mac-command-modifier, x-meta-keysym, etc. without
sacrificing super or alt keybinds.
2018-12-31 15:00:05 -05:00
Henrik Lissner
3f195614d9
Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
Henrik Lissner
a29163740d
GIT_ASKPASS=git-gui--askpass for GUI Emacs+Windows 2018-12-22 17:00:06 -05:00
Henrik Lissner
d6cb0ec5f5
General cleanup & minor refactoring 2018-12-22 04:25:15 -05:00
Henrik Lissner
4daa9271a0
Introduce general.el & rewrite map!
+ Now uses an overriding keymap for leader keys, so that it is always
  available, even outside of normal/visual states. In insert/emacs
  states, or in sessions where evil is absent, an alternative prefix is
  used for leader/localleader keys. See these variables:
  + doom-leader-prefix
  + doom-leader-alt-prefix
  + doom-localleader-prefix
  + doom-localleader-alt-prefix
+ Keybinds now support alternative prefixes through the new :alt-prefix
  property. This is useful for non-evil users and non-normal evil
  states. By default, this is M-SPC (leader) and M-SPC m (localleader).
+ Removed +evil-commands flag from config/default (moved to
  feature/evil/+commands.el).
+ config/default/+bindings.el has been split into
  config/default/+{evil,emacs}-bindings.el, which one is loaded depends
  on whether evil is present or not. The latter is blank, but will soon
  be populated with a keybinding scheme for non-evil users (perhaps
  inspired by #641).
+ The define-key! macro has been replaced; it is now an alias for
  general-def.
+ Added unmap! as an alias for general-unbind.
+ The following modifier key conventions are now enforced for
  consistency, across all OSes:
    alt/option      = meta
    windows/command = super
  It used to be
    alt/option      = alt
    windows/command = meta
  Many of the default keybinds have been updated to reflect this switch,
  but it is likely to affect personal meta/super keybinds!

The map! macro has also been rewritten to use general-define-key. Here
is what has been changed:

+ map! no longer works with characters, e.g. (map! ?x #'do-something) is
  no longer supported. Keys must be kbd-able strings like "C-c x" or
  vectors like [?C-c ?x].
+ The :map and :map* properties are now the same thing. If specified
  keymaps aren't defined when binding keys, it is automatically
  deferred.
+ The way you bind local keybinds has changed:

    ;; Don't do this
    (map! :l "a" #'func-a
          :l "b" #'func-b)
    ;; Do this
    (map! :map 'local "a" #'func-a
                      "b" #'func-b)

+ map! now supports the following new blocks:
  + (:if COND THEN-FORM ELSE-FORM...)
  + (:alt-prefix PREFIX KEYS...) -- this prefix will be used for
    non-normal evil states. Equivalent to :non-normal-prefix in general.
+ The way you declare a which-key label for a prefix key has changed:

    ;; before
    (map! :desc "label" :prefix "a" ...)
    ;; now
    (map! :prefix ("a" . "label") ...)

+ It used to be that map! supported binding a key to a key sequence,
  like so:

    (map! "a" [?x])  ; pressing a is like pressing x

  This functionality was removed *temporarily* while I figure out the
  implementation.

Addresses: #448, #814, #860
Mentioned in: #940
2018-12-22 04:14:43 -05:00
Henrik Lissner
f43e64e505
Add ns-auto-titlebar package for MacOS
This fixes mismatching frame title and frame coloring, as well as
auto-sets the ns-appearance parameter depending on your theme.
2018-10-25 13:42:20 -04:00
Henrik Lissner
3a23ff56cd
General formatting & minor refactors 2018-09-02 17:20:19 +02:00
Henrik Lissner
036337afa1
Populate LC_CTYPE, LC_ALL & LANG by default 2018-08-01 22:35:10 +02:00
Henrik Lissner
e816a1ecac
Load exec-path-from-shell in daemon sessions
On MacOS, the daemon is unlikely to run with the correct environment if
launched through launchctl or brew services, so it makes sense to use
exec-path-from-shell there too.

May address #736
2018-07-10 00:32:22 +02:00
Henrik Lissner
0d925cda5e
Load core-os sooner & in all sessions
Indirectly fixes set-env! errors when using it from your init files.
2018-06-18 12:04:30 +02:00
Henrik Lissner
68903ae398
Set exec-path-from-shell-debug instead of aliasing
Also fixes the defvaralias error that occurs on the latest Emacs (but
only on MacOS).
2018-06-17 21:41:44 +02:00
Henrik Lissner
98d2f1de3f
Add set-env! autodef; make :env obsolete 2018-06-15 03:42:01 +02:00
Henrik Lissner
81c465a545
Move OS constants to core/core.el
So it is universally available to all of Doom, rather than excluding
sessions that haven't called doom-initialize interactively.
2018-06-08 13:31:45 +02:00
Henrik Lissner
f8b9cff4aa
Get rid of doom-pre-init-hook 2018-05-28 16:07:11 +02:00
Henrik Lissner
2d2ce3cff9
Fix exec-path/osx-clipboard initializing too early 2018-05-20 00:08:19 +02:00
Henrik Lissner
22e18ad0a6
core-os: remove unnecessary after! wrapping 2018-03-25 03:07:18 -04:00
Henrik Lissner
a94ddd4a58
core-os: correct typo in :env setting #449 2018-03-12 12:41:00 -04:00
Henrik Lissner
738f39d21a
Change how shell env is injected #449
Changes the behavior of the :env setting to fetch the shell variables
immediately on call.
2018-03-02 19:55:05 -05:00
Henrik Lissner
a9cbfc7f4e
New :env setting for pulling shell envvars into MacOS sessions
:env lets you specify what environment variables exec-path-from-shell
should pull in from your shell environment at startup. As such, these
need to be defined at startup. :env is useless post-init.

May address #433
2018-03-01 01:03:03 -05:00
Henrik Lissner
48e605a7ca
Delay exec-path-from-shell & don't omit it after byte-compile
Gives users an opportunity to customize what environment variables
exec-path-from-shell pulls in.

May address #433
2018-03-01 01:03:03 -05:00
Henrik Lissner
cacf13f226
Don't byte-compile exec-path on MacOS 2018-02-28 17:57:30 -05:00
Henrik Lissner
b40924a80b
core-os: add IS-WINDOWS & w32-get-true-file-attributes = nil
First step in a long journey towards Windows support.
2018-02-02 23:45:54 -05:00
Henrik Lissner
805f7e7175
core-os: x-underline-at-descent-line = t 2018-02-01 19:58:44 -05:00
Henrik Lissner
f1c34fba72
core-os: remove unnecessary persistent-soft-store 2017-06-10 11:54:47 +02:00
Henrik Lissner
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
Henrik Lissner
27bfa14def General refactor + cleanup 2017-06-05 14:23:17 +02:00
Henrik Lissner
4ede35129d core-os: don't use gtk tooltips on linux (ew) 2017-05-16 18:05:39 +02:00
Bryan Gilbert
1af63004ca disable copy on visual state change for BOTH mac and linux 2017-05-09 10:10:13 -04:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
0c23ff43a4 Add doom-protected-packages for excluding packages from autoremoval 2017-04-11 08:43:26 -04:00
Henrik Lissner
8b0184181d exec-path-from-shell: silence interactive message on startup on OSX 2017-04-04 22:18:02 -04:00
Henrik Lissner
769cf850c9 General comment + README cleanup 2017-03-20 04:24:10 -04:00
Henrik Lissner
c6a61b9b2c core-os: add exec-path failsafe 2017-03-20 04:05:17 -04:00
Henrik Lissner
8aac4b2091 doom/clear-* => doom/clean-* (consistent with makefile tasks) 2017-03-19 23:48:43 -04:00
Henrik Lissner
88454f58ec core-os: don't cache exec-path too aggressively 2017-03-19 22:51:29 -04:00
Henrik Lissner
635c0fdaa7 core-os: add doc comment to exec-path-from-shell 2017-03-17 22:50:28 -04:00
Henrik Lissner
253858303e General cleanup + refactor 2017-02-25 02:11:56 -05:00
Henrik Lissner
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -05:00
Henrik Lissner
72577b823c Add core-os.el 2017-02-20 00:26:07 -05:00
Henrik Lissner
b3c1351fa6 Remove unused core files 2017-02-20 00:23:05 -05:00
Henrik Lissner
50ea98319f Rewrite core libraries (WIP) 2017-01-16 23:15:48 -05:00
Henrik Lissner
65da0e0a9e Add Linux config (mainly for Arch) 2016-10-02 23:34:54 +02:00
Henrik Lissner
19bd579ede Move (x-)?select-enable-clipboard to core-os.el 2016-09-22 13:51:04 +02:00
Henrik Lissner
2dac48fb2b Refactor core-os* 2016-05-24 18:27:02 -04:00
Henrik Lissner
0ef6837648 core.os.el 2016-05-22 23:10:04 -04:00