Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brew style fixes to modernize and allow this repository to be tapped … #761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Formula/ace-window.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AceWindow < EmacsFormula
desc "Faster window switching in Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/ack-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AckEmacs < EmacsFormula
desc "Emacs interface to Ack-like tools"
Expand Down
6 changes: 2 additions & 4 deletions Formula/ada-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AdaMode < EmacsFormula
desc "Emacs major mode for editing Ada sources"
Expand All @@ -24,9 +24,7 @@ def install
elisp.install (Dir["*.el"] - %w[ada-mode-pkg.el]), Dir["*.elc"]

info.install Dir["*.info"]
if build.with? "reference"
resource("reference").stage { info.install Dir["*"] }
end
resource("reference").stage { info.install Dir["*"] } if build.with? "reference"
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/adaptive-wrap.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AdaptiveWrap < EmacsFormula
desc "Emacs minor mode for smart soft-wrapping"
Expand Down
15 changes: 8 additions & 7 deletions Formula/adjust-parens.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AdjustParens < EmacsFormula
desc "Emacs minor mode for indenting Lisp and Clojure"
Expand All @@ -14,13 +14,14 @@ def install
Dir["*.elc"]
end

def caveats; <<~EOS
Add the following to your init file:
def caveats
<<~EOS
Add the following to your init file:

(require 'adjust-parens)
(add-hook 'emacs-lisp-mode-hook #'adjust-parens-mode)
(add-hook 'clojure-mode-hook #'adjust-parens-mode)
EOS
(require 'adjust-parens)
(add-hook 'emacs-lisp-mode-hook #'adjust-parens-mode)
(add-hook 'clojure-mode-hook #'adjust-parens-mode)
EOS
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/ag-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AgEmacs < EmacsFormula
desc "Emacs front-end to ag (the silver searcher)"
Expand Down
2 changes: 1 addition & 1 deletion Formula/aggressive-indent.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AggressiveIndent < EmacsFormula
desc "Emacs minor mode to keep code always indented"
Expand Down
2 changes: 1 addition & 1 deletion Formula/ahungry-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AhungryEmacs < EmacsFormula
desc "Bright and bold color theme for Emacs"
Expand Down
11 changes: 6 additions & 5 deletions Formula/all-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AllEmacs < EmacsFormula
desc "Emacs package to edit all lines matching a given regexp"
Expand All @@ -15,11 +15,12 @@ def install
(share/"emacs/site-lisp/all").install "all.el", "all.elc"
end

def caveats; <<~EOS
Add the following to your init file:
def caveats
<<~EOS
Add the following to your init file:

(require 'all)
EOS
(require 'all)
EOS
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/android-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AndroidMode < EmacsFormula
desc "Emacs minor mode for Android application development"
Expand Down
2 changes: 1 addition & 1 deletion Formula/ansi-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AnsiEmacs < EmacsFormula
desc "Emacs library to convert strings into ANSI"
Expand Down
2 changes: 1 addition & 1 deletion Formula/ansible-doc.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AnsibleDoc < EmacsFormula
desc "Ansible documentation lookup for Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/anzu-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AnzuMode < EmacsFormula
desc "Emacs minor mode for numbering search results"
Expand Down
15 changes: 8 additions & 7 deletions Formula/applescript-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class ApplescriptMode < EmacsFormula
desc "Emacs major mode for editing AppleScript"
Expand All @@ -17,13 +17,14 @@ def install
"applescript-mode.elc"
end

def caveats; <<~EOS
Add the following to your init file:
def caveats
<<~EOS
Add the following to your init file:

(require 'applescript-mode)
(add-to-list 'auto-mode-alist '("\\.applescript$" . applescript-mode))
(add-to-list 'interpreter-mode-alist '("osascript" . applescript-mode))
EOS
(require 'applescript-mode)
(add-to-list 'auto-mode-alist '("\\.applescript$" . applescript-mode))
(add-to-list 'interpreter-mode-alist '("osascript" . applescript-mode))
EOS
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/ascii-art-to-unicode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AsciiArtToUnicode < EmacsFormula
desc "Convert ASCII line art to Unicode line art"
Expand Down
2 changes: 1 addition & 1 deletion Formula/assess-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AssessEmacs < EmacsFormula
desc "Test support functions for Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/async-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AsyncEmacs < EmacsFormula
desc "Emacs library for asynchronous processing"
Expand Down
11 changes: 6 additions & 5 deletions Formula/aumix-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AumixMode < EmacsFormula
desc "Emacs major mode for controlling aumix in a buf"
Expand All @@ -17,11 +17,12 @@ def install
"aumix-mode.elc"
end

def caveats; <<~EOS
Add the following to your init file:
def caveats
<<~EOS
Add the following to your init file:

(autoload 'aumix "aumix-mode" nil t)
EOS
(autoload 'aumix "aumix-mode" nil t)
EOS
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/auto-complete.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AutoComplete < EmacsFormula
desc "Autocompletion extension for Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/auto-overlays.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class AutoOverlays < EmacsFormula
desc "Emacs library for creating overlays based on regular expressions"
Expand Down
2 changes: 1 addition & 1 deletion Formula/avy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class Avy < EmacsFormula
desc "Emacs library for navigating text via trees"
Expand Down
2 changes: 1 addition & 1 deletion Formula/beacon-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class BeaconMode < EmacsFormula
desc "Highlight the cursor when an Emacs window scrolls"
Expand Down
2 changes: 1 addition & 1 deletion Formula/browse-kill-ring.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class BrowseKillRing < EmacsFormula
desc "Tool for examining kill history in Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/bundler-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class BundlerEmacs < EmacsFormula
desc "Bundler helpers for Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/buttercup.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class Buttercup < EmacsFormula
desc "Behavior-driven Emacs Lisp testing"
Expand Down
11 changes: 6 additions & 5 deletions Formula/caps-lock-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class CapsLockEmacs < EmacsFormula
desc "Caps lock as an Emacs minor mode"
Expand All @@ -17,11 +17,12 @@ def install
"caps-lock.elc"
end

def caveats; <<~EOS
Add the following to your init file:
def caveats
<<~EOS
Add the following to your init file:

(require 'caps-lock)
EOS
(require 'caps-lock)
EOS
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/cargo-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class CargoMode < EmacsFormula
desc "Emacs Minor Mode for Cargo, Rust's Package Manager."
Expand Down
13 changes: 7 additions & 6 deletions Formula/chess-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class ChessEmacs < EmacsFormula
desc "Chess module for Emacs"
homepage "http://elpa.gnu.org/packages/chess.html"
url "http://elpa.gnu.org/packages/chess-2.0.4.tar"
sha256 "5a16dbd56432be81f1c313fc88972ac690c2dc5a82c1035da37b8472ab5c01eb"
head "http://git.savannah.gnu.org/r/emacs/elpa.git",
:branch => "externals/chess"
branch: "externals/chess"

depends_on EmacsRequirement => "24.1"
depends_on "dunn/emacs/cl-lib" if Emacs.version < Version.create("24.3")
Expand All @@ -19,11 +19,12 @@ def install
info.install "chess.info"
end

def caveats; <<~EOS
Add the following to your init file:
def caveats
<<~EOS
Add the following to your init file:

(require 'chess)
EOS
(require 'chess)
EOS
end

test do
Expand Down
4 changes: 2 additions & 2 deletions Formula/cider.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class Cider < EmacsFormula
desc "Clojure IDE for Emacs"
Expand All @@ -8,7 +8,7 @@ class Cider < EmacsFormula
head "https://github.com/clojure-emacs/cider.git"

depends_on EmacsRequirement => "24.4"
depends_on :java => ["1.7+", :run]
depends_on java: ["1.7+", :run]

depends_on "dunn/emacs/clojure-mode"
depends_on "dunn/emacs/dash-emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/circe.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class Circe < EmacsFormula
desc "Emacs IRC client"
Expand Down
2 changes: 1 addition & 1 deletion Formula/cl-generic.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class ClGeneric < EmacsFormula
desc "Forward compatibility library for Emacs 24 and below"
Expand Down
13 changes: 7 additions & 6 deletions Formula/cl-lib.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class ClLib < EmacsFormula
desc "Compatibility library for Emacs 24's cl-lib"
Expand All @@ -23,12 +23,13 @@ def install
end

if Emacs.version >= Version.create("24.3")
def caveats; <<~EOS
Warning: Emacs 24.3 and higher includes cl-lib
def caveats
<<~EOS
Warning: Emacs 24.3 and higher includes cl-lib

Installing the compatibility library in parallel can have unexpected consequences.
Make sure Emacs' native cl-lib appears before this one in your load-path.
EOS
Installing the compatibility library in parallel can have unexpected consequences.
Make sure Emacs' native cl-lib appears before this one in your load-path.
EOS
end
end

Expand Down
2 changes: 1 addition & 1 deletion Formula/cloc-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class ClocEmacs < EmacsFormula
desc "LOC-counting functions for Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/clojure-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class ClojureMode < EmacsFormula
desc "Emacs major mode for Clojure"
Expand Down
2 changes: 1 addition & 1 deletion Formula/coffee-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class CoffeeMode < EmacsFormula
desc "Emacs major mode for CoffeeScript"
Expand Down
2 changes: 1 addition & 1 deletion Formula/commander-emacs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class CommanderEmacs < EmacsFormula
desc "Emacs command-line parser"
Expand Down
2 changes: 1 addition & 1 deletion Formula/company-mode.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class CompanyMode < EmacsFormula
desc "Modular in-buffer completion framework for Emacs"
Expand Down
2 changes: 1 addition & 1 deletion Formula/context-coloring.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)
require File.expand_path("../Homebrew/emacs_formula", __dir__)

class ContextColoring < EmacsFormula
desc "Emacs mode to color JS and Elisp code by scope"
Expand Down
Loading