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

Unbalanced parens in Package-Requires in file ... #304

Closed
kleewho opened this issue Jul 6, 2015 · 2 comments
Closed

Unbalanced parens in Package-Requires in file ... #304

kleewho opened this issue Jul 6, 2015 · 2 comments
Labels

Comments

@kleewho
Copy link

kleewho commented Jul 6, 2015

When running cask install (or anything else actually) I get this error Unbalanced parens in Package-Requires in file ejis.el. Here it's content.

;;; ejis.el -- formatting settings for java-mode -*- lexical-binding: t; -*-

;; Copyright (C) 2015 Łukasz Klich

;; Author: Lukasz Klich <klich.lukasz@gmail.com>
;; Created: 06 Jul 2015
;; Version: 0.1.0
;; Keywords: java
;; URL: http://github.com/kleewho/ejis
;; Package-Requires: ((dash "2.11.0"))

;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;; emacs-java-intellij-style - configuration for java-mode to format
;; code just like default settings in IntelliJ

;;; Code:

(require 'cc-mode)
(require 'dash)

(defconst ejis--intellij-java-style
  '((c-basic-offset . 4)
    (c-comment-only-line-offset . (0 . 0))
    ;; the following preserves Javadoc starter lines
    (c-offsets-alist . ((inline-open           . 0)
                        (topmost-intro-cont    . +)
                        (statement-block-intro . +)
                        (knr-argdecl-intro     . 5)
                        (substatement-open     . +)
                        (substatement-label    . +)
                        (label                 . +)
                        (statement-case-open   . +)
                        (case-label            . +)
                        (statement-cont        . ++)
                        (arglist-intro         . c-lineup-arglist-intro-after-paren)
                        (arglist-close         . c-lineup-arglist)
                        (access-label          . 0)
                        (inher-cont            . c-lineup-java-inher)
                        (func-decl-cont        . c-lineup-java-throws)
                        (arglist-cont-nonempty . ejis--arglist-cont-nonempty))))
  "Intellij Java Programming Style.")

(c-add-style "IntelliJ" ejis--intellij-java-style)

(defun ejis--function-declaration? (pos)
  (save-excursion
    (goto-char pos)
    (--any (eq (c-langelem-sym it) 'topmost-intro)
           (c-guess-basic-syntax))))

(defun ejis--arglist-cont-nonempty (arg)
  (if (ejis--function-declaration? (c-langelem-pos arg))
      (c-lineup-arglist arg)
    (* 2 c-basic-offset)))

(provide 'ejis)
;;; ejis.el ends here

Probably it's some kind of rookie mistake but the message is not helping me at all with figuring out what's that mistake is. Package-Requires is very simple and I don't see there any unbalanced parens.

➜  ejis git:(master) ✗ cask --version           (master⚡)
0.7.3
➜  ejis git:(master) emacs -Q --version         (master⚡)
GNU Emacs 24.4.50.1
Copyright (C) 2014 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
@swsnr
Copy link
Contributor

swsnr commented Jul 6, 2015

See Library Headers:

The very first line should have this format:

;;; filename --- description

Note that there are three dashes between filename and description, whereas your code snippet has just two. Adding a 3rd dash fixes the issue.

Closing.

@swsnr swsnr closed this as completed Jul 6, 2015
@swsnr swsnr added the question label Jul 6, 2015
@kleewho
Copy link
Author

kleewho commented Jul 6, 2015

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants