elisp-conventions

Enforce modern Emacs Lisp conventions for .el files.

1|1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Jylhis/skills --skill elisp-conventions-jylhis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elisp-conventions
Source: https://github.com/Jylhis/skills/tree/main/skills/elisp-conventions
Command: npx skills add https://github.com/Jylhis/skills --skill elisp-conventions-jylhis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Emacs Lisp projects often adopt older formatting, keybinding, and initialization patterns that hinder readability, maintainability, and modernization across teams.

Core Features & Use Cases

  • Modernizes Emacs Lisp files with lexical-binding, declarative keymaps, and setopt-based customization.
  • Demonstrates up-to-date patterns for use-package, tree-sitter mode setups, and consistent file structure.
  • Use case: when reviewing or creating .el modules for Emacs 29+/30+ to ensure compatibility and clean API usage.

Quick Start

Review a representative Emacs Lisp file and apply lexical-binding, use-package, and modern API usage.

Frequently Asked Questions about elisp-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are modern Emacs Lisp conventions for writing .el files?

Lexical-binding is a modern Emacs Lisp convention required for clean code, ensuring predictable variable scoping and preventing dynamic binding bugs when writing or reviewing .el files for Emacs 29+.

How do I set up tree-sitter mode using use-package in Emacs Lisp?

Apply lexical-binding, use-package declarations, and modern Emacs Lisp APIs to review and update .el modules, ensuring compatibility with Emacs 29+ and clean configuration patterns.

Does this Emacs Lisp convention guide support Emacs 29 and 30+?

Yes, these Emacs Lisp coding conventions apply to writing and configuring .el files for Emacs 29+ and 30+, ensuring compatibility and clean API usage across packages, modes, and extensions.

Why should I use setopt and defcustom instead of direct variable assignment in Elisp?

Using setopt and defcustom follows modern Emacs Lisp conventions for declarative customization, improving maintainability and readability over older direct variable assignment patterns in .el files.

What's the best way to enforce consistent naming and hook rules in Emacs Lisp files?

Apply provided guidance and patterns to enforce consistent Emacs Lisp naming, hook, and file structure rules, ensuring clean and maintainable .el modules across packages and extensions.