Commit Graph

623 Commits

Author SHA1 Message Date
Henrik Lissner
4ea4754162 Add commands for using bin/doom from inside Emacs
This is experimental. I'd eventually like users to be able to management
Doom from inside Emacs, if they desire. This may be the only way to have
a decent user experience on Windows, for that matter.

Also adds a popup rule for it.
2018-09-28 21:13:27 -04:00
Henrik Lissner
4bdd6002a4
Restore projectile-project-root's old behavior
For now...
2018-09-27 21:55:19 -04:00
Henrik Lissner
aa930256b8
Update doom/reload-project for changes upstream
In projectile.
2018-09-25 23:36:54 -04:00
Henrik Lissner
377dbae3fc
Install/compile packages in order of declaration
This should fix an issue where a package A, which uses macros from a
package B, is installed before package B, causing void-function errors.

The currently known and affected packages are neotree, parinfer, and
evil-collection.
2018-09-25 11:00:30 -04:00
Henrik Lissner
cffb1d367f Update without-project-cache! macro
To match upstream changes in projectile
2018-09-22 13:15:12 -04:00
Henrik Lissner
ac63596be8 Fix doom-project-root returning nil if no project
It should return default-directory. A change upstream broke this.
2018-09-22 13:15:12 -04:00
Henrik Lissner
a65868ba89
Fix "end of buffer" errors on backspace 2018-09-21 00:52:53 -04:00
Henrik Lissner
9245e030bb
Fix doom/reload-font for XFT fonts 2018-09-20 22:22:14 -04:00
Henrik Lissner
1e710e94e3
Minor refactors
+ cl-flet* -> cl-flet
+ refactor display-line-numbers-mode
2018-09-19 19:43:32 -04:00
Henrik Lissner
a9c925c50b
Rename doom*newline-and-indent
To doom*newline-indent-and-continue-comments; to better describe what it
does.
2018-09-14 10:42:09 -04:00
Henrik Lissner
162b8dc81f
Add doom/set-frame-opacity command
I use this to play videos behind Emacs while I work.
2018-09-13 19:15:16 -04:00
Henrik Lissner
d9a9243a62 Remove unnecessary let block 2018-09-12 23:03:23 +01:00
Edwin Török
8f5d822363 make compile-core: fix warnings
It is easier to spot real problems if the code is warning-free.

Replacing `gensym` with `make-symbol` is an idea taken from here:
b44c08dd45

In defer-until!:
core-lib.el:150:19:Warning: function ‘gensym’ from cl package called at
    runtime

In add-transient-hook!:
core-lib.el:216:16:Warning: function ‘gensym’ from cl package called at
    runtime

In toplevel form:
autoload/message.el:35:1:Warning: Unused lexical variable ‘spec’

In toplevel form:
autoload/line-numbers.el:31:1:Warning: defcustom for
    ‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:31:1:Warning: defcustom for
    ‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
    ‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
    ‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
    ‘display-line-numbers-width-start’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
    ‘display-line-numbers-width-start’ fails to specify containing group

In toplevel form:
cli/autoloads.el:137:1:Warning: Unused lexical variable ‘type’

Preserve name of unused lexical var _type

Makes it obvious what is stored there.
2018-09-12 23:03:23 +01:00
Henrik Lissner
7b6dbe92c0
Add doom/reload-font command 2018-09-09 18:17:12 -04:00
Henrik Lissner
1b172e9f43
Better enh-ruby-mode suport in doom/describe-module & editorconfig
+ Associates enh-ruby-mode with :lang ruby for doom/describe-module
+ Enables editorconfig to detect extension-less or file-less ruby
  files (from shebang lines or file local variables).
2018-09-09 09:58:21 -04:00
Henrik Lissner
4d10c28c37
Change doom-ansi-apply, print! & format!
Color let-functions no longer take format string arguments. e.g.

  (format! (red "Hello %s" "world"))

Becomes

  (format! (red "Hello %s") "world")

The same goes for print!. Also, doom-ansi-apply now takes two arguments
instead of three.

Also merges doom-message-{fg,bg,fx} into doom-ansi-alist, and reduces
backtrace noise when errors originate from inside these macros.
2018-09-09 09:58:20 -04:00
Henrik Lissner
f7ad520ee0
doom update: prevent GC in async instances
Offers a marginal improved to outdated check times.
2018-09-09 09:58:20 -04:00
Henrik Lissner
309fd767d6
Add :deps property to doom-get-packages
Also fixes an issue where doom install wouldn't catch missing
dependnecies of desired packages.

If :dep is non-nil, doom-get-packages will include package dependencies
in the resulting package list.
2018-09-09 09:58:20 -04:00
Henrik Lissner
77d2d84e14
Refactor core-cli
Moved to separate files for better organization.
2018-09-09 09:58:20 -04:00
Henrik Lissner
49e6e68a07
Use EMACS26+ to detect native line numbers
Checking for the 'display-line-numbers symbol property is clumsy and
checking for boundp is pointless now that we have a Emacs 25 polyfill
for display-line-numbers-mode.
2018-09-09 09:58:19 -04:00
Henrik Lissner
be29623f0d
Reorganize doom core-lib & reformat autoload/ui.el
+ Move doom-files-in to autoload/files.el
+ Move doom*shut-up to autoload/ui.el
+ Reorganize autoload/ui.el
2018-09-09 09:58:19 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
84abac6b69
Remove def-menu!; use :localleader keys instead
def-menu was clumsy. We could use a better UI for refactoring commands,
but they should be available via localleader keybinds in any case.
2018-09-09 09:58:18 -04:00
Henrik Lissner
d2f9d28577
doom-project-(find-file|browse): resolve symlinks
This prevents absolute paths appearing in many find-in/browse commands,
like +default/find-in-emacsd, +default/find-in-config, or
+default/browse-project.
2018-09-09 09:58:18 -04:00
Henrik Lissner
72d8c5dd56
New doom/delete-trailing-newlines command 2018-09-01 12:30:34 +02:00
Henrik Lissner
708ad138c8
doom/sudo-find-file: don't sudo writeable files 2018-09-01 00:02:39 +02:00
Henrik Lissner
44e536e8e8
Refactor core-ui
+ Remove doom/switch-theme (replaced with an advice for load-theme)
+ Reorganize core-ui
+ Fix Emacs 26+ hl-line hack being applied for Emacs 25 users
+ Rename doom|show-whitespace-maybe to doom|highlight-non-default-indentation
+ Disable tool-bar, menu-bar and vertical-scroll-bars via
  default-frame-alist; this is a little faster than using the minor
  modes.
2018-08-31 23:44:08 +02:00
Henrik Lissner
d80e79203a
Replace delete-trailing-whitespace with ws-butler
ws-butler only strips trailing spaces on lines that have been modified.

+ ws-butler is disabled if editorconfig enables
  trim_trailing_whitespace, which resorts to delete-trailing-whitespace
  instead.
+ Updates doom|(enable|disable)-delete-trailing-whitespace hooks to use
  ws-butler-mode.
2018-08-31 13:59:12 +02:00
Henrik Lissner
edc9bf70af
Delete trailing whitespace, globally, by default
Also adds doom|disable-delete-trailing-whitespace hook, which can be
used to disable this behavior on a per-buffer basis. If you want to turn
off this global behavior:

  (remove-hook 'write-file-functions #'delete-trailing-whitespace)
2018-08-30 20:36:15 +02:00
Henrik Lissner
25cc01ce41
Fix & refactor doom/open-vanilla-sandbox
It would fail to run the new instance because the arguments send to it
were incorrectly formatted.
2018-08-30 13:29:56 +02:00
Henrik Lissner
d6695d4cf3
Update doom/toggle-line-numbers #847
Now that display-line-numbers-mode has been backported to Emacs 25, we
can use it instead of interacting with nlinum directly.
2018-08-29 02:15:51 +02:00
Henrik Lissner
6318572d10
Fix invalid marker in doom/window-enlargen #825 2018-08-27 20:07:17 +02:00
Henrik Lissner
247b219ea1
doom-project-find-file: set default-directory too #833
Be extra sure!
2018-08-26 12:00:13 +02:00
Henrik Lissner
1a6ee8e0df
Fix doom-project-find-file if $HOME is a repo #833
If HOME is a repo, projectile resolves all project roots to HOME. This
fixes any commands that rely on this project resolution by explicitly
telling them what project they're in instead.
2018-08-26 11:47:04 +02:00
Henrik Lissner
8e092b9884
Refactor doom-quit-p 2018-08-25 04:01:35 +02:00
Henrik Lissner
77838534ce
Polyfill line-number-display-width for Emacs 25
Fixes void-function line-number-display-width errors (used in
company-pseudo-tooltip-frontend).
2018-08-25 03:16:32 +02:00
Henrik Lissner
9eae0860c6
Fix doom/window-enlargen in popup windows #825 2018-08-23 17:21:42 +02:00
Henrik Lissner
1890356d11
Refactor & fix vanilla sandbox in tty Emacs
Except for Windows users. Doesn't seem to be possible to suspend and
foreground Emacs in windows' shell.
2018-08-23 16:18:56 +02:00
Henrik Lissner
12f6add329
package-initialize for doom/open-vanilla-sandbox 2018-08-23 11:27:27 +02:00
Henrik Lissner
9e08620350
Use locate-library to detect display-line-numbers
Now that display-line-numbers is polyfilled, a boundp check is useless.
2018-08-21 04:32:27 +02:00
Henrik Lissner
9a4cce8d9a
Refactor detection of native display-line-numbers 2018-08-21 04:10:18 +02:00
Henrik Lissner
a7da9a4738
💥 Rewrite line numbers system for Emacs 25
This removes the various doom-line-number* variables and replaces it
with the Emacs 26 display-line-numbers API, which I've ported to Emacs
25.x (however, it uses nlinum under the hood, and not all of
display-line-numbers options are supported).
2018-08-21 03:34:39 +02:00
Henrik Lissner
4618b7afad
Refactor & reformat core-ui 2018-08-21 02:56:54 +02:00
Henrik Lissner
6b7f97f4fc
Autoload doom-quit-p & revise its docstring 2018-08-20 23:56:56 +02:00
Henrik Lissner
480378d30c
Fix doom/info in noninteractive sessions 2018-08-16 01:26:28 +02:00
Henrik Lissner
5714ff423a
Fix evil jumplist after jumping to ag match
helm-ag would formerly add multiple entries to the jump list. It now
only adds one, and recenters the window when jumping to an ag match.
2018-08-13 21:47:55 +02:00
Henrik Lissner
b149dcffd4
Replace esup with doom/profile-emacs #788
Since esup (called directly) doesn't work with Doom.
2018-08-13 03:50:17 +02:00
Henrik Lissner
25d9786edf
Add early-init-file support to doom/profile-emacs #788
And fix wrong-type-argument: stringp errors when running esup.

Also ensure that doom|run-all-startup-hooks sets after-init-time.
2018-08-13 03:47:33 +02:00
Henrik Lissner
c530866f0a
Add option to load doom in vanilla sandbox
This adds the option to run elisp in an environment where doom core &
modules are loaded, but not your private modules or config.

Also updates the vanilla sandbox text template.
2018-08-12 02:45:01 +02:00
Henrik Lissner
9ddfca44d1
Rename doom//reload-project -> doom/reload-project
Conform command to new naming convention (removed the doom//abc
convention).
2018-08-11 21:45:53 +02:00