Doom-emacs: [BUG] File mode specification error

Created on 21 Nov 2019  路  2Comments  路  Source: hlissner/doom-emacs

Describe the issue
Setting c-default-style in my config:

(setq c-default-style "bsd")

Triggers the following error, and doesn't launch c++-mode (or c-mode)

File mode specification error: (wrong-type-argument listp bsd)

Debugger entered--Lisp error: (wrong-type-argument listp "bsd")
assq(other "bsd")
(if (and nil (not (eq nil (quote eq)))) (assoc (quote other) c-default-style nil) (assq (quote other) c-default-style))
(let* ((p (if (and nil (not (eq nil (quote eq)))) (assoc (quote other) c-default-style nil) (assq (quote other) c-default-style)))) (if p (setcdr p "doom") (setq c-default-style (cons (setq p (cons (quote other) "doom")) c-default-style))))
(progn (use-package-statistics-gather :config (quote cc-mode) nil) (set-electric! (quote (c-mode c++-mode objc-mode java-mode)) :chars (quote (10 125 123))) (set-docsets! (quote c-mode) "C") (set-docsets! (quote c++-mode) "C++" "Boost") (set-rotate-patterns! (quote c++-mode) :symbols (quote (("public" "protected" "private") ("class" "struct")))) nil (add-hook (quote c-mode-common-hook) (function rainbow-delimiters-mode)) (progn (add-hook (quote c++-mode-hook) (function +cc-fontify-constants-h) nil nil) (add-hook (quote c-mode-hook) (function +cc-fontify-constants-h) nil nil)) (setq c-basic-offset tab-width c-backspace-function (function delete-backward-char)) (c-add-style "doom" (quote ((c-comment-only-line-offset . 0) (c-hanging-braces-alist (brace-list-open) (brace-entry-open) (substatement-open after) (block-close . c-snug-do-while) (arglist-cont-nonempty)) (c-cleanup-list brace-else-brace) (c-offsets-alist (knr-argdecl-intro . 0) (substatement-open . 0) (substatement-label . 0) (statement-cont . +) (case-label . +) (brace-list-intro . 0) (brace-list-close . -) (arglist-intro . +) (arglist-close +cc-lineup-arglist-close 0) (inline-open . 0) (inlambda . 0) (access-label . -) (inclass +cc-c++-lineup-inclass +) (label . 0))))) (let* ((p (if (and nil (not (eq nil ...))) (assoc (quote other) c-default-style nil) (assq (quote other) c-default-style)))) (if p (setcdr p "doom") (setq c-default-style (cons (setq p (cons (quote other) "doom")) c-default-style)))) t (use-package-statistics-gather :config (quote cc-mode) t))
(closure (t) nil (progn (use-package-statistics-gather :config (quote cc-mode) nil) (set-electric! (quote (c-mode c++-mode objc-mode java-mode)) :chars (quote (10 125 123))) (set-docsets! (quote c-mode) "C") (set-docsets! (quote c++-mode) "C++" "Boost") (set-rotate-patterns! (quote c++-mode) :symbols (quote (("public" "protected" "private") ("class" "struct")))) nil (add-hook (quote c-mode-common-hook) (function rainbow-delimiters-mode)) (progn (add-hook (quote c++-mode-hook) (function +cc-fontify-constants-h) nil nil) (add-hook (quote c-mode-hook) (function +cc-fontify-constants-h) nil nil)) (setq c-basic-offset tab-width c-backspace-function (function delete-backward-char)) (c-add-style "doom" (quote ((c-comment-only-line-offset . 0) (c-hanging-braces-alist (brace-list-open) (brace-entry-open) (substatement-open after) (block-close . c-snug-do-while) (arglist-cont-nonempty)) (c-cleanup-list brace-else-brace) (c-offsets-alist (knr-argdecl-intro . 0) (substatement-open . 0) (substatement-label . 0) (statement-cont . +) (case-label . +) (brace-list-intro . 0) (brace-list-close . -) (arglist-intro . +) (arglist-close +cc-lineup-arglist-close 0) (inline-open . 0) (inlambda . 0) (access-label . -) (inclass +cc-c++-lineup-inclass +) (label . 0))))) (let* ((p (if (and nil (not ...)) (assoc (quote other) c-default-style nil) (assq (quote other) c-default-style)))) (if p (setcdr p "doom") (setq c-default-style (cons (setq p (cons ... "doom")) c-default-style)))) t (use-package-statistics-gather :config (quote cc-mode) t)))()
eval-after-load-helper("/usr/share/emacs/26.3/lisp/progmodes/cc-mode.elc")
run-hook-with-args(eval-after-load-helper "/usr/share/emacs/26.3/lisp/progmodes/cc-mode.elc")
do-after-load-evaluation("/usr/share/emacs/26.3/lisp/progmodes/cc-mode.elc")
c-mode()
set-auto-mode-0(c-mode nil)
#f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -- mode tag\nchecks for a mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed ininterpreter-mode-alist',\nmatches the buffer beginning against magic-mode-alist',\ncompares the filename against the entries inauto-mode-alist',\nthen matches the buffer beginning against magic-fallback-mode-alist'.\n\nIfenable-local-variables' is nil, or if the file name matches\ninhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file. Iflocal-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it. In other words\nwe don't actually set it to the same mode the buffer already has." #)()
apply(#f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -- mode tag\nchecks for a mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed ininterpreter-mode-alist',\nmatches the buffer beginning against magic-mode-alist',\ncompares the filename against the entries inauto-mode-alist',\nthen matches the buffer beginning against magic-fallback-mode-alist'.\n\nIfenable-local-variables' is nil, or if the file name matches\ninhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file. Iflocal-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it. In other words\nwe don't actually set it to the same mode the buffer already has." #) nil)
#f(advice-wrapper :after #f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -- mode tag\nchecks for a mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed ininterpreter-mode-alist',\nmatches the buffer beginning against magic-mode-alist',\ncompares the filename against the entries inauto-mode-alist',\nthen matches the buffer beginning against magic-fallback-mode-alist'.\n\nIfenable-local-variables' is nil, or if the file name matches\ninhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file. Iflocal-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it. In other words\nwe don't actually set it to the same mode the buffer already has." #) auto-minor-mode-set)()
apply(#f(advice-wrapper :after #f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -- mode tag\nchecks for a mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed ininterpreter-mode-alist',\nmatches the buffer beginning against magic-mode-alist',\ncompares the filename against the entries inauto-mode-alist',\nthen matches the buffer beginning against magic-fallback-mode-alist'.\n\nIfenable-local-variables' is nil, or if the file name matches\ninhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file. Iflocal-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it. In other words\nwe don't actually set it to the same mode the buffer already has." #) auto-minor-mode-set) nil)
so-long--set-auto-mode(#f(advice-wrapper :after #f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -- mode tag\nchecks for a mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed ininterpreter-mode-alist',\nmatches the buffer beginning against magic-mode-alist',\ncompares the filename against the entries inauto-mode-alist',\nthen matches the buffer beginning against magic-fallback-mode-alist'.\n\nIfenable-local-variables' is nil, or if the file name matches\ninhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file. Iflocal-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it. In other words\nwe don't actually set it to the same mode the buffer already has." #) auto-minor-mode-set))
apply(so-long--set-auto-mode #f(advice-wrapper :after #f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -- mode tag\nchecks for a mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed ininterpreter-mode-alist',\nmatches the buffer beginning against magic-mode-alist',\ncompares the filename against the entries inauto-mode-alist',\nthen matches the buffer beginning against magic-fallback-mode-alist'.\n\nIfenable-local-variables' is nil, or if the file name matches\ninhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file. Iflocal-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it. In other words\nwe don't actually set it to the same mode the buffer already has." #) auto-minor-mode-set) nil)
set-auto-mode()
normal-mode(t)
#f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #)(t t)
apply(#f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) (t t))
#f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h)(t t)
apply(#f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) (t t))
(if (setq doom-large-file-p (and buffer-file-name (not doom-large-file-p) (file-readable-p buffer-file-name) (> (nth 7 (file-attributes buffer-file-name)) (* 1024 1024 doom-large-file-size)))) (prog1 (apply orig-fn args) (if (memq major-mode doom-large-file-excluded-modes) (setq doom-large-file-p nil) (so-long-minor-mode 1) (message "Large file detected! Cutting a few corners to improve performance..."))) (apply orig-fn args))
doom--optimize-for-large-files-a(#f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) t t)
apply(doom--optimize-for-large-files-a #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) (t t))
#f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a)(t t)
apply(#f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) (t t))
#f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h)(t t)
apply(#f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) (t t))
#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h)(t t)
apply(#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) (t t))
#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h)(t t)
apply(#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) (t t))
#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h)(t t)
apply(#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h) (t t))
#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h) doom--after-call-undo-tree-h)(t t)
apply(#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h) doom--after-call-undo-tree-h) (t t))
#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h) doom--after-call-undo-tree-h) doom--after-call-ws-butler-h)(t t)
apply(#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h) doom--after-call-undo-tree-h) doom--after-call-ws-butler-h) (t t))
#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h) doom--after-call-undo-tree-h) doom--after-call-ws-butler-h) doom--after-call-git-commit-h)(t t)
apply(#f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :before #f(advice-wrapper :around #f(advice-wrapper :before #f(compiled-function (&optional error warn noauto after-find-file-from-revert-buffer nomodes) "Called after finding a file and by the default revert function.\nSets buffer mode, parses file-local and directory-local variables.\nOptional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an\nerror in reading the file. WARN non-nil means warn if there\nexists an auto-save file more recent than the visited file.\nNOAUTO means don't mess with auto-save mode.\nFourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER is ignored\n(see revert-buffer-in-progress-p' for similar functionality).\nFifth arg NOMODES non-nil means don't alter the file's modes.\nFinishes by calling the functions infind-file-hook'\nunless NOMODES is non-nil." #) doom--after-call-paren-h) doom--optimize-for-large-files-a) doom--after-call-recentf-h) doom--after-call-saveplace-h) doom--after-call-smartparens-h) doom--after-call-so-long-h) doom--after-call-undo-tree-h) doom--after-call-ws-butler-h) doom--after-call-git-commit-h) (t t))
after-find-file(t t)
find-file-noselect-1(# "~/test.c" nil nil "~/test.c" nil)
find-file-noselect("/home/alarsyo/test.c" nil nil nil)
find-file("/home/alarsyo/test.c")
counsel-find-file-action("/home/alarsyo/test.c")
ivy-call()
ivy-read("Find file: " read-file-name-internal :matcher counsel--find-file-matcher :initial-input nil :action counsel-find-file-action :preselect nil :require-match confirm-after-completion :history file-name-history :keymap (keymap (96 lambda (&optional arg) "nil (`nil')" (interactive "p") (if (string= "" ivy-text) (execute-kbd-macro (kbd "M-o b")) (self-insert-command arg))) (C-backspace . counsel-up-directory) (67108991 . counsel-up-directory)) :caller counsel-find-file)
counsel--find-file-1("Find file: " nil counsel-find-file-action counsel-find-file)
counsel-find-file()
funcall-interactively(counsel-find-file)
call-interactively(counsel-find-file nil nil)
command-execute(counsel-find-file)

Steps to reproduce

  1. have (setq c-default-style "bsd") in your config.el
  2. open a .c or .cc file

System information

((emacs
(version . "26.3")
(features . "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2")
(build . "Aug 29, 2019")
(buildopts "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now")
(windowsys . batch)
(daemonp . server-running))
(doom
(version . "2.0.9")
(build . "HEAD -> develop 83090894d 2019-11-21 00:50:25 -0500"))
(system
(type . gnu/linux)
(config . "x86_64-pc-linux-gnu")
(shell . "/usr/bin/zsh")
(uname . "Linux 5.3.12-arch1-1 #1 SMP PREEMPT Wed, 20 Nov 2019 19:45:16 +0000 x86_64")
(path "/opt/bison-epita/bin" "~/.local/bin" "~/.cargo/bin" "~/.node_modules/bin" "/usr/local/sbin" "/usr/local/bin" "/usr/bin" "/opt/flutter/bin" "/usr/lib/jvm/default/bin" "/usr/bin/site_perl" "/usr/bin/vendor_perl" "/usr/bin/core_perl" "~/.cargo/bin" "~/.local/bin" "~/go/bin" "~/go/bin" "~/.emacs.d/bin" "/usr/lib/emacs/26.3/x86_64-pc-linux-gnu"))
(config
(envfile . envvar-file)
(elc-files . 0)
(modules :completion company ivy :ui doom doom-quit fill-column hl-todo modeline nav-flash ophints (popup +all +defaults) vc-gutter vi-tilde-fringe window-select :editor (evil +everywhere) fold (format +onsave) rotate-text snippets :emacs dired electric ibuffer vc :tools (eval +overlay) flycheck (lookup +docsets) lsp magit :lang cc data emacs-lisp (go +lsp) latex markdown ocaml (org +dragndrop +ipython +pandoc +present) python rst (rust +lsp) sh web :config (default +bindings +smartparens))
(packages ob-go)
(elpa "n/a")))

:lang cc bug resolved

All 2 comments

As of da07b63 this issue should be resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

Wow, that was fast. Thanks for your work on Doom Emacs!

Was this page helpful?
0 / 5 - 0 ratings