Skip to content

Commit 65db1c2

Browse files
committed
Merge pull request #70 from camdez/customize
Improve support for Emacs' Customize facility
2 parents 2e57045 + ce5cd8a commit 65db1c2

File tree

1 file changed

+50
-41
lines changed

1 file changed

+50
-41
lines changed

gist.el

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
(require 'tabulated-list)
4949

5050
(defgroup gist nil
51-
"Gist"
51+
"Interface to GitHub's Gist."
5252
:group 'applications)
5353

5454
(defcustom gist-list-format '((id "Id" 10 nil identity)
@@ -58,7 +58,7 @@
5858
(or (and public "public")
5959
"private")))
6060
(description "Description" 0 nil identity))
61-
"Format for gist list"
61+
"Format for gist list."
6262
:type '(alist :key-type
6363
(choice
6464
(const :tag "Id" id)
@@ -77,49 +77,58 @@
7777
:group 'gist)
7878

7979
(defcustom gist-view-gist nil
80-
"If non-nil, automatically use `browse-url' to view gists after
81-
they're posted.")
80+
"If non-nil, view gists with `browse-url' after posting."
81+
:type 'boolean
82+
:group 'gist)
8283

8384
(defcustom gist-multiple-files-mark "+"
84-
"Symbol to use to indicate multiple-files gist")
85+
"Symbol to use to indicate gists with multiple files."
86+
:type 'string
87+
:group 'gist)
8588

8689
(defcustom gist-ask-for-description nil
87-
"If non-nil, ask for a description before submitting
88-
the gist.")
89-
90-
(defvar gist-supported-modes-alist '((action-script-mode . "as")
91-
(c-mode . "c")
92-
(c++-mode . "cpp")
93-
(clojure-mode . "clj")
94-
(common-lisp-mode . "lisp")
95-
(css-mode . "css")
96-
(diff-mode . "diff")
97-
(emacs-lisp-mode . "el")
98-
(lisp-interaction-mode . "el")
99-
(erlang-mode . "erl")
100-
(haskell-mode . "hs")
101-
(html-mode . "html")
102-
(io-mode . "io")
103-
(java-mode . "java")
104-
(javascript-mode . "js")
105-
(jde-mode . "java")
106-
(js2-mode . "js")
107-
(lua-mode . "lua")
108-
(ocaml-mode . "ml")
109-
(objective-c-mode . "m")
110-
(perl-mode . "pl")
111-
(php-mode . "php")
112-
(python-mode . "py")
113-
(ruby-mode . "rb")
114-
(text-mode . "txt")
115-
(scala-mode . "scala")
116-
(sql-mode . "sql")
117-
(scheme-mode . "scm")
118-
(smalltalk-mode . "st")
119-
(sh-mode . "sh")
120-
(tcl-mode . "tcl")
121-
(tex-mode . "tex")
122-
(xml-mode . "xml")))
90+
"If non-nil, prompt for description before submitting gist."
91+
:type 'boolean
92+
:group 'gist)
93+
94+
(defcustom gist-supported-modes-alist '((action-script-mode . "as")
95+
(c-mode . "c")
96+
(c++-mode . "cpp")
97+
(clojure-mode . "clj")
98+
(common-lisp-mode . "lisp")
99+
(css-mode . "css")
100+
(diff-mode . "diff")
101+
(emacs-lisp-mode . "el")
102+
(lisp-interaction-mode . "el")
103+
(erlang-mode . "erl")
104+
(haskell-mode . "hs")
105+
(html-mode . "html")
106+
(io-mode . "io")
107+
(java-mode . "java")
108+
(javascript-mode . "js")
109+
(jde-mode . "java")
110+
(js2-mode . "js")
111+
(lua-mode . "lua")
112+
(ocaml-mode . "ml")
113+
(objective-c-mode . "m")
114+
(perl-mode . "pl")
115+
(php-mode . "php")
116+
(python-mode . "py")
117+
(ruby-mode . "rb")
118+
(text-mode . "txt")
119+
(scala-mode . "scala")
120+
(sql-mode . "sql")
121+
(scheme-mode . "scm")
122+
(smalltalk-mode . "st")
123+
(sh-mode . "sh")
124+
(tcl-mode . "tcl")
125+
(tex-mode . "tex")
126+
(xml-mode . "xml"))
127+
"Mapping between major-modes and file extensions.
128+
Used to generate filenames for created gists, and to select
129+
appropriate modes from fetched gist files (based on filenames)."
130+
:type '(alist :key-type (symbol :tag "Mode")
131+
:value-type (string :tag "Extension")))
123132

124133
(defvar gist-list-db nil)
125134

0 commit comments

Comments
 (0)