8000 Inline `go--is-go-asm` to prevent `go-mode.el` loading by toyboot4e · Pull Request #456 · dominikh/go-mode.el · GitHub
[go: up one dir, main page]

Skip to content

Inline go--is-go-asm to prevent go-mode.el loading - #456

Open
toyboot4e wants to merge 2 commits into
dominikh:masterfrom
toyboot4e:fix/auto_loading
Open

toyboot4e wants to merge 2 commits into
dominikh:masterfrom
toyboot4e:fix/auto_loading

Conversation

@toyboot4e
@toyboot4e toyboot4e commented Dec 4, 2026 •
Copy link
Copy Markdown

Changes

  • Drop cl-some use in go--is-go-asm. (Otherwise, we need to call (require 'cl-lib) in go--is-go-asm later).
  • Wrap go--is-go-asm in a progn. The function definition will be copied to autoloads, and call of it won't load go-mode.el.

Confirmation

After this PR, the snippet prints go-mode loaded: nil:

emacs -Q --batch -L . --eval '(progn
  (loaddefs-generate "." "go-mode-autoloads.el")
  (load "./go-mode-autoloads.el")
  (find-file "README.md")
  (message "go-mode loaded: %s" (featurep (quote go-mode))))'
  INFO     Scraping 4 files for loaddefs...
  INFO     Scraping 4 files for loaddefs...done
Loading /Users/fr/ghq/github.com/dominikh/go-mode.el/go-mode-autoloads.el (source)...
go-mode loaded: nil

toyboot4e and others added 2 commits December 4, 2026 22:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

go-mode.el is loaded for any file, even if it's not a Go file

1 participant

0