aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sx-auth.el64
-rw-r--r--sx-favorites.el2
-rw-r--r--sx-filter.el2
-rw-r--r--sx-inbox.el6
-rw-r--r--sx-networks.el2
-rw-r--r--sx-notify.el2
-rw-r--r--sx-question-list.el2
-rw-r--r--sx-question-mode.el2
-rw-r--r--sx-site.el2
-rw-r--r--sx-tag.el2
-rw-r--r--sx-time.el2
-rw-r--r--sx.el2
12 files changed, 46 insertions, 44 deletions
diff --git a/sx-auth.el b/sx-auth.el
index 686aa0c..cba310d 100644
--- a/sx-auth.el
+++ b/sx-auth.el
@@ -47,32 +47,33 @@ what you are doing!
This variable is set with `sx-auth-authenticate'.")
-(defvar sx-auth-method-auth '((me . t)
- (inbox . t)
- (notifications . t)
- (events . t)
- (posts (comments add))
- (comments delete
- edit
- flags
- upvote)
- (answers accept
- delete
- downvote
- edit
- flags
- upvote)
- (questions answers
- add
- close
- delete
- downvote
- edit
- favorite
- flags
- render
- upvote
- (unanswered my-tags)))
+(defconst sx-auth-method-auth
+ '((me . t)
+ (inbox . t)
+ (notifications . t)
+ (events . t)
+ (posts (comments add))
+ (comments delete
+ edit
+ flags
+ upvote)
+ (answers accept
+ delete
+ downvote
+ edit
+ flags
+ upvote)
+ (questions answers
+ add
+ close
+ delete
+ downvote
+ edit
+ favorite
+ flags
+ render
+ upvote
+ (unanswered my-tags)))
"List of methods that require auth.
Methods are of the form \(METHOD . SUBMETHODS) where SUBMETHODS
is \(METHOD METHOD METHOD ...).
@@ -80,11 +81,12 @@ Methods are of the form \(METHOD . SUBMETHODS) where SUBMETHODS
If all SUBMETHODS require auth or there are no submethods, form
will be \(METHOD . t)")
-(defvar sx-auth-filter-auth '(question.upvoted
- question.downvoted
- answer.upvoted
- answer.downvoted
- comment.upvoted)
+(defconst sx-auth-filter-auth
+ '(question.upvoted
+ question.downvoted
+ answer.upvoted
+ answer.downvoted
+ comment.upvoted)
"List of filter types that require auth.
Keywords are of the form \(OBJECT TYPES) where TYPES is \(FILTER
FILTER FILTER).")
diff --git a/sx-favorites.el b/sx-favorites.el
index 7fdc772..d98b4c2 100644
--- a/sx-favorites.el
+++ b/sx-favorites.el
@@ -30,7 +30,7 @@
(require 'sx-networks)
(require 'sx-filter)
-(defvar sx-favorite-list-filter
+(defconst sx-favorite-list-filter
(sx-filter-from-nil
(question.question_id)))
diff --git a/sx-filter.el b/sx-filter.el
index 4695446..57c491d 100644
--- a/sx-filter.el
+++ b/sx-filter.el
@@ -107,7 +107,7 @@ return the compiled filter."
;;; Browsing filter
-(defvar sx-browse-filter
+(defconst sx-browse-filter
(sx-filter-from-nil
((question body_markdown
bounty_amount
diff --git a/sx-inbox.el b/sx-inbox.el
index 01000a6..1efceb1 100644
--- a/sx-inbox.el
+++ b/sx-inbox.el
@@ -28,7 +28,7 @@
;;; API
-(defvar sx-inbox-filter
+(defconst sx-inbox-filter
'((inbox_item.answer_id
inbox_item.body
inbox_item.comment_id
@@ -91,7 +91,7 @@ These are identified by their links.")
"List of notification items which are read.
These are identified by their links.")
-(defvar sx-inbox--header-line
+(defconst sx-inbox--header-line
'(" "
(:propertize "n p j k" face mode-line-buffer-id)
": Navigate"
@@ -106,7 +106,7 @@ These are identified by their links.")
": Quit")
"Header-line used on the inbox list.")
-(defvar sx-inbox--mode-line
+(defconst sx-inbox--mode-line
'(" "
(:propertize
(sx-inbox--notification-p
diff --git a/sx-networks.el b/sx-networks.el
index 2695689..45eaf05 100644
--- a/sx-networks.el
+++ b/sx-networks.el
@@ -29,7 +29,7 @@
(require 'sx-site)
(require 'sx-filter)
-(defvar sx-network--user-filter
+(defconst sx-network--user-filter
(sx-filter-from-nil
((badge_count bronze
silver
diff --git a/sx-notify.el b/sx-notify.el
index 6dc90b9..0c9a5b8 100644
--- a/sx-notify.el
+++ b/sx-notify.el
@@ -27,7 +27,7 @@
;;; mode-line notification
-(defvar sx-notify--mode-line
+(defconst sx-notify--mode-line
'((sx-inbox--unread-inbox (sx-inbox--unread-notifications " ["))
(sx-inbox--unread-inbox
(:propertize
diff --git a/sx-question-list.el b/sx-question-list.el
index b9f34a0..c72dc0d 100644
--- a/sx-question-list.el
+++ b/sx-question-list.el
@@ -228,7 +228,7 @@ and thus not displayed in the list of questions.
This is ignored if `sx-question-list--refresh-function' is set.")
(make-variable-buffer-local 'sx-question-list--dataset)
-(defvar sx-question-list--header-line
+(defconst sx-question-list--header-line
'(" "
(:propertize "n p j k" face mode-line-buffer-id)
": Navigate"
diff --git a/sx-question-mode.el b/sx-question-mode.el
index f702822..5303ebb 100644
--- a/sx-question-mode.el
+++ b/sx-question-mode.el
@@ -178,7 +178,7 @@ property."
;;; Major-mode
-(defvar sx-question-mode--header-line
+(defconst sx-question-mode--header-line
'(" "
(:propertize "n p TAB" face mode-line-buffer-id)
": Navigate"
diff --git a/sx-site.el b/sx-site.el
index 02f618e..9b2ea34 100644
--- a/sx-site.el
+++ b/sx-site.el
@@ -28,7 +28,7 @@
(require 'sx-cache)
(require 'sx-filter)
-(defvar sx-site-browse-filter
+(defconst sx-site-browse-filter
(sx-filter-from-nil
((site site_type
name
diff --git a/sx-tag.el b/sx-tag.el
index 7ac80c6..5e75890 100644
--- a/sx-tag.el
+++ b/sx-tag.el
@@ -26,7 +26,7 @@
;;; Getting the list from a site
-(defvar sx-tag-filter
+(defconst sx-tag-filter
(sx-filter-from-nil
(tag.name
tag.synonyms))
diff --git a/sx-time.el b/sx-time.el
index 1d1267b..9fa0037 100644
--- a/sx-time.el
+++ b/sx-time.el
@@ -26,7 +26,7 @@
(require 'time-date)
-(defvar sx-time-seconds-to-string
+(defconst sx-time-seconds-to-string
;; (LIMIT NAME VALUE)
;; We use an entry if the number of seconds in question is less than
;; LIMIT, but more than the previous entry's LIMIT.
diff --git a/sx.el b/sx.el
index 8cfb5dc..3271755 100644
--- a/sx.el
+++ b/sx.el
@@ -300,7 +300,7 @@ Return the result of BODY."
(push ov sx--overlays))
result))
-(defvar sx--ascii-replacement-list
+(defconst sx--ascii-replacement-list
'(("[:space:]" . "")
("àåáâäãåą" . "a")
("èéêëę" . "e")