Commit Graph

820 Commits

Author SHA1 Message Date
7727920629 Rewrite doom/reload 2019-08-28 15:19:58 -04:00
464ebabc2a Add warning to doom/reload (SPC h R) 2019-08-28 12:40:59 -04:00
a5096ff86b Add ELPA packages to doom info output 2019-08-27 00:05:12 -04:00
aff5cc5b28 Move file-exists-p! to core/autoload/files.el 2019-08-22 13:03:12 -04:00
3b9701161a Fix build date in doom/version
When it is called interactively from a file outside of ~/.emacs.d
2019-08-21 12:17:32 -04:00
2eb8035f15 Add more DEPRECATED tags
For Emacs 25 functionality that'll be removed when 25.x support is
dropped.
2019-08-19 21:04:11 -04:00
2a3f95f615 Update line-number-display-width polyfill
It takes one argument in later versions of Emacs. This file really
shouldn't be visible to Emacs 25.x and earlier, but there has been one
case of it being indexed by Doom's autoload scanner.

Also marks the library with the new DEPRECATED tag. It will be removed
once Doom removes 25.x support.
2019-08-17 16:04:26 -04:00
b2fd76cb49 Ensure straight is loaded on doom-initialize-packages
Without causing recursive require errors if called in an after! handler
for straight.
2019-08-15 19:56:20 -04:00
4e016eb843 Merge pull request #1621 from ashtonbaker/fix-spelling
fix small spelling mistake in fonts.el
2019-08-15 15:02:17 -04:00
374940b959 Persist scratch buffers more proactively
Prior to this change, scratch buffers were saved only when Emacs is
killed. In cases where Emacs doesn't die properly, you'd lose your
scratch contents. Now, they are persisted as soon as you close them.
2019-08-15 01:07:45 -04:00
7ded14f548 Refactor scratch buffer init 2019-08-15 01:02:00 -04:00
7d714b7531 Fix #1673: restore project-file-exists-p! macro 2019-08-14 22:36:19 -04:00
aa3538591a fix small spelling mistake in fonts.el 2019-08-12 14:47:39 -04:00
48415edce3 Fix #1644: --restore switch not recognized 2019-08-08 23:30:16 -04:00
956b8cc532 Merge pull request #1619 from filalex77/fix-doom-reload-packages
Require straight.el in doom/reload-packages
2019-08-07 21:48:10 -04:00
29e851da27 Try counsel-file-jump before project-find-file-in
The former is more reliable (and faster, with the fd/rg hack in the next
commit).

Also (hopefully) fixes the "cl-no-applicable-method: No applicable
method: project-roots" error emitted when project-find-file-in fails to
identify the target as a project root.
2019-08-06 19:43:38 -04:00
3423974234 Minor refactors & tweaks across the board 2019-08-06 14:50:42 -04:00
eb0ae8622c Fix file paths in comment headings 2019-08-06 14:45:55 -04:00
ec45c9367a Require straight.el in doom/reload-packages
Because it's not loaded for some reason.

Also, require is not a big problem IMO: if you run this interactively, the
require cost probably doesn't matter much already.

Fixes #1618.
2019-07-30 14:47:19 +03:00
e3d6d13be5 Fix doom/help-packages
Also adds doom-package-backend function.

TODO: Report more information about straight packages.
2019-07-29 03:18:38 +02:00
a354bba261 Appease byte-compiler-san-chan-sensei-sama-chama
Praise be.
2019-07-28 16:10:53 +02:00
8773d85db0 Fix oversights in plist library
- doplist! now returns the RETVAL expression
- Fix doom-plist-merge (was incomplete)
2019-07-28 16:10:53 +02:00
3330501af6 Remove examples in custom-*set-faces!
They're already in docs/api.org, which helpful buffers will display
alongside a function/macro's documentation.
2019-07-28 16:10:53 +02:00
529f8d7e7a Fix custom-theme-set-faces!
The body was still quoted from when it was a macro.
2019-07-28 16:10:53 +02:00
a6d77e951f Move doom-run-all-startup-hooks-h to autoload/debug.el 2019-07-28 02:32:25 +02:00
b332a923a5 Add in-house point-in-{comment,string} predicates
Toward uncoupling Doom from smartparens.
2019-07-27 22:56:49 +02:00
a441435f3e Fix debug helper for format!
Throwing format errors when there are no arguments.

Also makes relpath a little more lenient about nil/empty input.
2019-07-27 17:05:17 +02:00
402260f154 Fix doom/reload & doom/reload-autoloads 2019-07-27 17:04:17 +02:00
1a72cf0677 Minor, general refactors to package API 2019-07-26 20:17:30 +02:00
486e21ab44 Refactor doom-info; remove doom-find-packages
The function was overcomplicated and wasn't any more useful than looking
directly at doom-packages
2019-07-26 15:25:59 +02:00
e70998228a Fix doom-package-private-p 2019-07-26 15:25:30 +02:00
ecb655dc01 Add nested face support to custom-theme-set-faces!
And convert it and custom-set-faces! to functions because they didn't
need to be macros.
2019-07-26 03:12:06 +02:00
6f56b9f9d4 Add autoload/themes.el library 2019-07-23 14:31:00 +02:00
76cacb5bfe 💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
d7ed52f3c7 Add ui/hydra module
And conforms all existing hydras to the naming convention for
interactive commands, e.g.

  +vc-gutter-hydra -> +vc/gutter-hydra
2019-07-22 23:51:12 +02:00
6200f5d876 Move file functions in core-lib to autoload/files 2019-07-22 23:22:55 +02:00
93f7520c79 Refactor Doom core init process (again)
- Eager-load all core autoloaded libraries if autoloads file isn't
  present.
- Renames functions to be more descriptive of their true purpose:
  - doom-initialize-autoloads -> doom-load-autoloads-file
  - doom-load-env-vars -> doom-load-envvars-file
- Use doom-module-p instead of featurep! for backend use (the latter is
  mainly syntax sugar for module use, and evaluates at compile/expansion
  time, which may cause hash-table-p errors early in the startup
  process).
- Reorder plist library to prevent load order race condition with the
  functions using the macros that haven't been defined yet.
2019-07-22 23:22:54 +02:00
d8dbb90931 Add core plist library 2019-07-22 18:04:50 +02:00
ea65f82e4d Fix void doom-package-list error on first install 2019-07-22 03:48:29 +02:00
060ede0e2e General, minor reformatting across the board
And an offering of blood to our great lord Byte Compiler-sama.
2019-07-22 02:37:45 +02:00
c7ce21af70 Fix prefix arg for doom/switch-to-scratch-buffer
Also use clearer name for prefix arg var in
doom/open-project-scratch-buffer.
2019-07-22 02:30:41 +02:00
832b7e9294 Remove witout-project-cache!, rename project-file-exists-p
To doom-project-file-exists-p, which is now a function.
2019-07-22 02:30:41 +02:00
a0593cc097 Refactor font loading
Init extra fonts within doom-init-fonts-h. This was moved because I used
to believe that set-fontset-font (according to its documentation) could
only change the frame-local fontset. It turns out that the exception
when you pass t for its first argument, which targets the default (i.e.
global) fontset.
2019-07-22 02:30:40 +02:00
b90dede1ab 💥 Replace package.el/quelpa with straight #374
There are a few kinks to iron out, but for the most part it's done. Doom
Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues.

This update doesn't come with rollback or lockfile support yet, but I
will eventually include one with Doom, and packages will be (by default,
anyway) updated in sync with Doom.

Relevant threads: #1577 #1566 #1473
2019-07-22 02:30:40 +02:00
ee10b3b0d9 core-lib: add doom-{glob,path,dir}, replace {file,dir}!
- file! replaces FILE!
- dir! replaces DIR!
- doom-{glob,path,dir} have the power to construct paths out of the
  segment pieces provided to it.
- Move doom-files-in to core-lib and refactor to use the above.
2019-07-22 02:30:39 +02:00
987061aedd Rewrite autoload/message.el & move to format.el
Adds new convenience macros like print! and insert!, and adds classes;
which are helper functions that can be called inline within format!,
print! et co, e.g.

  (format! "%s" (filename "/tmp/some/file")) ; => file
  (format! "%s" (relpath "/tmp/some/file" "/tmp")) ; => some/file
  (format! "%s" (dirname "/tmp/some/file")) ; => /tmp/some

Check out doom-format-class-alist for more.
2019-07-22 02:30:39 +02:00
149b2617b0 💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
51d3b1b424 💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
8b27d19e0b Fix "err=[-50]" gnutls error
When updating/installing packages.
2019-07-20 11:05:52 +02:00
24b40824ce Add doom-{visible,buried}-buffer-p predicates 2019-07-18 13:13:31 +02:00