Commit Graph

645 Commits

Author SHA1 Message Date
4ccbc9c7df Update major-mode=>module alist for help commands 2019-02-24 21:00:19 -05:00
1758266ce4 Fix doom/describe-setters 2019-02-24 20:40:16 -05:00
7c5eefee3e General, minor refactoring 2019-02-24 13:58:56 -05:00
acddf6a047 Move delete-backward-char & newline-and-indent advice
To config/default; the only place it is used.
2019-02-22 00:25:30 -05:00
afae6e4f1d Remove doom/toggle-comment-region-or-line
Replaced with simpler keybinds.
2019-02-21 19:13:36 -05:00
c82faf7f10 General reformatting & minor refactors 2019-02-19 15:53:26 -05:00
4437d80133 Add dos2unix & unix2dos conversion commands 2019-02-18 01:59:56 -05:00
9558b5e793 copy-seq -> copy-sequence
It's a possibility that the copy-seq alias doesn't exist in certain
builds of Emacs. Better safe than sorry.
2019-02-15 20:03:57 -05:00
11b4a3502a bindings: add common comment toggle
This is fairly common in most editors so let's make lives easier.
2019-01-28 23:14:14 -08:00
a3694edb15 Fix doom/update-package 2019-01-24 02:13:16 -05:00
b6718715fe Fix doom-big-font-mode when no frame exists
It must still be appended to emacs-startup-hook. If it's run any
earlier, doom|init-fonts will overwrite it.

Reported by @ar1a.
2019-01-21 22:19:14 -05:00
efa577dec2 Improve error-handling in doom/update-package 2019-01-21 17:39:42 -05:00
d80802d3c9 doom/cleanup-session: don't kill processes by default 2019-01-14 00:52:31 -05:00
31a0ad5b95 Move doom--condition-case! to core/cli/packages
The only place it is being used
2019-01-10 15:44:42 -05:00
81394cf733 Only prefer compiled theme on startup
...But not on doom/reload-theme or post-init load-theme calls.
2018-12-31 15:19:23 -05:00
e9608ab939 doom-project-find-file: unset projectile-project-root
Instead of setting it default-directory, which can cause symlink
resolution issues.
2018-10-14 23:59:26 -04:00
0ebf526e01 Fix doom/info omitting first module in each category
Discovered in #941
2018-10-12 14:07:25 -04:00
fe425c005e Add g-/g= keys for buffer narrowing/widening 2018-10-03 11:14:08 -04:00
e7fc1d3290 Fix wrong-type-arg: stringp, nocache errors
Fix old usage of doom-project-name and doom-project-root.
2018-09-28 23:49:18 -04:00
05d759fa8b doom/window-{enlargen,zoom}: assoc -> assq
A minor optimization. assq is significantly faster than assoc (not that
it matters for this incredibly insignificant use-case, but yay for
premature optimization!)
2018-09-28 21:13:28 -04:00
461fc8e312 Refactor doom-big-font-mode
Complain if doom-font or doom-big-font aren't set.
2018-09-28 21:13:27 -04:00
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
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
4bdd6002a4 Restore projectile-project-root's old behavior
For now...
2018-09-27 21:55:19 -04:00
aa930256b8 Update doom/reload-project for changes upstream
In projectile.
2018-09-25 23:36:54 -04:00
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
cffb1d367f Update without-project-cache! macro
To match upstream changes in projectile
2018-09-22 13:15:12 -04:00
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
a65868ba89 Fix "end of buffer" errors on backspace 2018-09-21 00:52:53 -04:00
9245e030bb Fix doom/reload-font for XFT fonts 2018-09-20 22:22:14 -04:00
1e710e94e3 Minor refactors
+ cl-flet* -> cl-flet
+ refactor display-line-numbers-mode
2018-09-19 19:43:32 -04:00
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
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
d9a9243a62 Remove unnecessary let block 2018-09-12 23:03:23 +01:00
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
7b6dbe92c0 Add doom/reload-font command 2018-09-09 18:17:12 -04:00
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
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
f7ad520ee0 doom update: prevent GC in async instances
Offers a marginal improved to outdated check times.
2018-09-09 09:58:20 -04:00
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
77d2d84e14 Refactor core-cli
Moved to separate files for better organization.
2018-09-09 09:58:20 -04:00
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
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
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
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
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
72d8c5dd56 New doom/delete-trailing-newlines command 2018-09-01 12:30:34 +02:00
708ad138c8 doom/sudo-find-file: don't sudo writeable files 2018-09-01 00:02:39 +02:00
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
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