From 24f042c8374cc7c7644a6aa14fa2c2b5bfe5bd8a Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 13 Nov 2018 11:46:46 +0100 Subject: [PATCH] update sx. Signed-off-by: Andreas Gerler --- elpa/sx-20150702.818/sx-autoloads.el | 146 --------- elpa/sx-20150702.818/sx-pkg.el | 11 - .../sx-auth.el | 10 +- elpa/sx-20180606.736/sx-autoloads.el | 306 ++++++++++++++++++ .../sx-babel.el | 2 +- .../sx-button.el | 14 +- .../sx-cache.el | 2 +- .../sx-compose.el | 2 +- .../sx-encoding.el | 8 +- .../sx-favorites.el | 2 +- .../sx-filter.el | 6 +- .../sx-inbox.el | 23 +- .../sx-interaction.el | 26 +- .../sx-load.el | 2 +- .../sx-method.el | 2 +- .../sx-networks.el | 4 +- .../sx-notify.el | 2 +- elpa/sx-20180606.736/sx-pkg.el | 16 + .../sx-question-list.el | 6 +- .../sx-question-mode.el | 13 +- .../sx-question-print.el | 143 ++++---- .../sx-question.el | 2 +- .../sx-request.el | 2 +- .../sx-search.el | 4 +- .../sx-site.el | 2 +- .../sx-switchto.el | 2 +- .../sx-tab.el | 57 +--- .../sx-tag.el | 0 .../sx-time.el | 2 +- .../sx-user.el | 2 +- .../sx.el | 8 +- 31 files changed, 516 insertions(+), 311 deletions(-) delete mode 100644 elpa/sx-20150702.818/sx-autoloads.el delete mode 100644 elpa/sx-20150702.818/sx-pkg.el rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-auth.el (97%) create mode 100644 elpa/sx-20180606.736/sx-autoloads.el rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-babel.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-button.el (94%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-cache.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-compose.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-encoding.el (97%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-favorites.el (98%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-filter.el (97%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-inbox.el (90%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-interaction.el (96%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-load.el (96%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-method.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-networks.el (97%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-notify.el (98%) create mode 100644 elpa/sx-20180606.736/sx-pkg.el rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-question-list.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-question-mode.el (98%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-question-print.el (87%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-question.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-request.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-search.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-site.el (97%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-switchto.el (97%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-tab.el (84%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-tag.el (100%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-time.el (98%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx-user.el (99%) rename elpa/{sx-20150702.818 => sx-20180606.736}/sx.el (98%) diff --git a/elpa/sx-20150702.818/sx-autoloads.el b/elpa/sx-20150702.818/sx-autoloads.el deleted file mode 100644 index 94d2b713..00000000 --- a/elpa/sx-20150702.818/sx-autoloads.el +++ /dev/null @@ -1,146 +0,0 @@ -;;; sx-autoloads.el --- automatically extracted autoloads -;; -;;; Code: -(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) - -;;;### (autoloads nil "sx" "sx.el" (21910 48876 0 0)) -;;; Generated autoloads from sx.el - -(autoload 'sx-bug-report "sx" "\ -File a bug report about the `sx' package. - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "sx-auth" "sx-auth.el" (21910 48876 0 0)) -;;; Generated autoloads from sx-auth.el - -(autoload 'sx-authenticate "sx-auth" "\ -Authenticate this application. -Authentication is required to read your personal data (such as -notifications) and to write with the API (asking and answering -questions). - -When this function is called, `browse-url' is used to send the -user to an authorization page managed by StackExchange. The -following privileges are requested: - -* read_inbox - use SX to manage and visit items in your inbox - -* write_acesss - write comments, ask questions, and post answers on your - behalf - -* no_expiry - do not pester you to reauthorize again - -After authorization with StackExchange, the user is then -redirected to a website managed by SX. The access token required -to use authenticated methods is included in the hash (which is -parsed and displayed prominently on the page). - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "sx-inbox" "sx-inbox.el" (21910 48877 0 0)) -;;; Generated autoloads from sx-inbox.el - -(autoload 'sx-inbox "sx-inbox" "\ -Display a buffer listing inbox items. -With prefix NOTIFICATIONS, list notifications instead of inbox. - -\(fn &optional NOTIFICATIONS)" t nil) - -(autoload 'sx-inbox-notifications "sx-inbox" "\ -Display a buffer listing notification items. - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "sx-interaction" "sx-interaction.el" (21910 -;;;;;; 48876 0 0)) -;;; Generated autoloads from sx-interaction.el - -(autoload 'sx-ask "sx-interaction" "\ -Start composing a question for SITE. -SITE is a string, indicating where the question will be posted. - -\(fn SITE)" t nil) - -;;;*** - -;;;### (autoloads nil "sx-search" "sx-search.el" (21910 48877 0 0)) -;;; Generated autoloads from sx-search.el - -(autoload 'sx-search "sx-search" "\ -Display search on SITE for question titles containing QUERY. -When TAGS is given, it is a lists of tags, one of which must -match. When EXCLUDED-TAGS is given, it is a list of tags, none -of which is allowed to match. - -Interactively, the user is asked for SITE and QUERY. With a -prefix argument, the user is asked for everything. - -\(fn SITE QUERY &optional TAGS EXCLUDED-TAGS)" t nil) - -(autoload 'sx-search-tag-at-point "sx-search" "\ -Follow tag under position POS or point. - -\(fn &optional POS)" t nil) - -;;;*** - -;;;### (autoloads nil "sx-switchto" "sx-switchto.el" (21910 48876 -;;;;;; 0 0)) -;;; Generated autoloads from sx-switchto.el - -(define-prefix-command 'sx-switchto-map) - -;;;*** - -;;;### (autoloads nil "sx-tab" "sx-tab.el" (21910 48876 0 0)) -;;; Generated autoloads from sx-tab.el - -(autoload 'sx-tab-all-questions (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-unanswered (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-unanswered-my-tags (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-featured (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-starred (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-frontpage (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-newest (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-topvoted (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-hot (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-week (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -(autoload 'sx-tab-month (expand-file-name "sx-tab" (when load-file-name (file-name-directory load-file-name))) nil t) - -;;;*** - -;;;### (autoloads nil nil ("sx-babel.el" "sx-button.el" "sx-cache.el" -;;;;;; "sx-compose.el" "sx-encoding.el" "sx-favorites.el" "sx-filter.el" -;;;;;; "sx-load.el" "sx-method.el" "sx-networks.el" "sx-notify.el" -;;;;;; "sx-pkg.el" "sx-question-list.el" "sx-question-mode.el" "sx-question-print.el" -;;;;;; "sx-question.el" "sx-request.el" "sx-site.el" "sx-tag.el" -;;;;;; "sx-time.el" "sx-user.el") (21910 48877 289626 0)) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; End: -;;; sx-autoloads.el ends here diff --git a/elpa/sx-20150702.818/sx-pkg.el b/elpa/sx-20150702.818/sx-pkg.el deleted file mode 100644 index a3c892d6..00000000 --- a/elpa/sx-20150702.818/sx-pkg.el +++ /dev/null @@ -1,11 +0,0 @@ -(define-package "sx" "20150702.818" "StackExchange client. Ask and answer questions on Stack Overflow, Super User, and the likes" - '((emacs "24.1") - (cl-lib "0.5") - (json "1.3") - (markdown-mode "2.0") - (let-alist "1.0.3")) - :url "https://github.com/vermiculus/sx.el/" :keywords - '("help" "hypermedia" "tools")) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/sx-20150702.818/sx-auth.el b/elpa/sx-20180606.736/sx-auth.el similarity index 97% rename from elpa/sx-20150702.818/sx-auth.el rename to elpa/sx-20180606.736/sx-auth.el index cba310d0..ac3bb171 100644 --- a/elpa/sx-20150702.818/sx-auth.el +++ b/elpa/sx-20180606.736/sx-auth.el @@ -1,6 +1,6 @@ ;;; sx-auth.el --- user authentication -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred @@ -35,7 +35,7 @@ (defconst sx-auth-root "https://stackexchange.com/oauth/dialog") (defconst sx-auth-redirect-uri - "http://vermiculus.github.io/sx.el/auth/auth.htm") + "https://vermiculus.github.io/sx.el/auth/auth.htm") (defconst sx-auth-client-id "3291") (defvar sx-auth-access-token @@ -112,6 +112,9 @@ following privileges are requested: * no_expiry do not pester you to reauthorize again +* private_info + TODO explanation. + After authorization with StackExchange, the user is then redirected to a website managed by SX. The access token required to use authenticated methods is included in the hash (which is @@ -128,8 +131,7 @@ parsed and displayed prominently on the page)." no_expiry private_info write_access)) - (redirect_uri . ,(url-hexify-string - sx-auth-redirect-uri))) + (redirect_uri . ,sx-auth-redirect-uri)) ",")))) (browse-url url) (read-string "Enter the access token displayed on the webpage: "))) diff --git a/elpa/sx-20180606.736/sx-autoloads.el b/elpa/sx-20180606.736/sx-autoloads.el new file mode 100644 index 00000000..6df86237 --- /dev/null +++ b/elpa/sx-20180606.736/sx-autoloads.el @@ -0,0 +1,306 @@ +;;; sx-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "sx" "sx.el" (0 0 0 0)) +;;; Generated autoloads from sx.el + +(autoload 'sx-bug-report "sx" "\ +File a bug report about the `sx' package. + +\(fn)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx" '("sx-"))) + +;;;*** + +;;;### (autoloads nil "sx-auth" "sx-auth.el" (0 0 0 0)) +;;; Generated autoloads from sx-auth.el + +(autoload 'sx-authenticate "sx-auth" "\ +Authenticate this application. +Authentication is required to read your personal data (such as +notifications) and to write with the API (asking and answering +questions). + +When this function is called, `browse-url' is used to send the +user to an authorization page managed by StackExchange. The +following privileges are requested: + +* read_inbox + use SX to manage and visit items in your inbox + +* write_acesss + write comments, ask questions, and post answers on your + behalf + +* no_expiry + do not pester you to reauthorize again + +* private_info + TODO explanation. + +After authorization with StackExchange, the user is then +redirected to a website managed by SX. The access token required +to use authenticated methods is included in the hash (which is +parsed and displayed prominently on the page). + +\(fn)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-auth" '("sx-auth-"))) + +;;;*** + +;;;### (autoloads nil "sx-babel" "sx-babel.el" (0 0 0 0)) +;;; Generated autoloads from sx-babel.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-babel" '("sx-babel-"))) + +;;;*** + +;;;### (autoloads nil "sx-button" "sx-button.el" (0 0 0 0)) +;;; Generated autoloads from sx-button.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-button" '("sx-"))) + +;;;*** + +;;;### (autoloads nil "sx-cache" "sx-cache.el" (0 0 0 0)) +;;; Generated autoloads from sx-cache.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-cache" '("sx-cache-"))) + +;;;*** + +;;;### (autoloads nil "sx-compose" "sx-compose.el" (0 0 0 0)) +;;; Generated autoloads from sx-compose.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-compose" '("sx-compose-"))) + +;;;*** + +;;;### (autoloads nil "sx-encoding" "sx-encoding.el" (0 0 0 0)) +;;; Generated autoloads from sx-encoding.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-encoding" '("sx-encoding-"))) + +;;;*** + +;;;### (autoloads nil "sx-favorites" "sx-favorites.el" (0 0 0 0)) +;;; Generated autoloads from sx-favorites.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-favorites" '("sx-favorite"))) + +;;;*** + +;;;### (autoloads nil "sx-filter" "sx-filter.el" (0 0 0 0)) +;;; Generated autoloads from sx-filter.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-filter" '("sx-"))) + +;;;*** + +;;;### (autoloads nil "sx-inbox" "sx-inbox.el" (0 0 0 0)) +;;; Generated autoloads from sx-inbox.el + +(autoload 'sx-inbox "sx-inbox" "\ +Display a buffer listing inbox items. +With prefix NOTIFICATIONS, list notifications instead of inbox. + +\(fn &optional NOTIFICATIONS)" t nil) + +(autoload 'sx-inbox-notifications "sx-inbox" "\ +Display a buffer listing notification items. + +\(fn)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-inbox" '("sx-inbox-"))) + +;;;*** + +;;;### (autoloads nil "sx-interaction" "sx-interaction.el" (0 0 0 +;;;;;; 0)) +;;; Generated autoloads from sx-interaction.el + +(autoload 'sx-open-link "sx-interaction" "\ +Visit element given by LINK inside Emacs. +Element can be a question, answer, or comment. + +\(fn LINK &optional _)" t nil) + +(autoload 'sx-org-get-link "sx-interaction" "\ +Add a link to this post to Org's memory. + +\(fn)" nil nil) + +(autoload 'sx-ask "sx-interaction" "\ +Start composing a question for SITE. +SITE is a string, indicating where the question will be posted. + +\(fn SITE)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-interaction" '("sx-"))) + +;;;*** + +;;;### (autoloads nil "sx-method" "sx-method.el" (0 0 0 0)) +;;; Generated autoloads from sx-method.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-method" '("sx-method-post-from-data"))) + +;;;*** + +;;;### (autoloads nil "sx-networks" "sx-networks.el" (0 0 0 0)) +;;; Generated autoloads from sx-networks.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-networks" '("sx-network-"))) + +;;;*** + +;;;### (autoloads nil "sx-notify" "sx-notify.el" (0 0 0 0)) +;;; Generated autoloads from sx-notify.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-notify" '("sx-notify-"))) + +;;;*** + +;;;### (autoloads nil "sx-question" "sx-question.el" (0 0 0 0)) +;;; Generated autoloads from sx-question.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-question" '("sx-"))) + +;;;*** + +;;;### (autoloads nil "sx-question-list" "sx-question-list.el" (0 +;;;;;; 0 0 0)) +;;; Generated autoloads from sx-question-list.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-question-list" '("sx-question-list-"))) + +;;;*** + +;;;### (autoloads nil "sx-question-mode" "sx-question-mode.el" (0 +;;;;;; 0 0 0)) +;;; Generated autoloads from sx-question-mode.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-question-mode" '("sx-question-mode"))) + +;;;*** + +;;;### (autoloads nil "sx-question-print" "sx-question-print.el" +;;;;;; (0 0 0 0)) +;;; Generated autoloads from sx-question-print.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-question-print" '("sx-question-mode-"))) + +;;;*** + +;;;### (autoloads nil "sx-request" "sx-request.el" (0 0 0 0)) +;;; Generated autoloads from sx-request.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-request" '("sx-"))) + +;;;*** + +;;;### (autoloads nil "sx-search" "sx-search.el" (0 0 0 0)) +;;; Generated autoloads from sx-search.el + +(autoload 'sx-search "sx-search" "\ +Display search on SITE for question titles containing QUERY. +When TAGS is given, it is a lists of tags, one of which must +match. When EXCLUDED-TAGS is given, it is a list of tags, none +of which is allowed to match. + +Interactively, the user is asked for SITE and QUERY. With a +prefix argument, the user is asked for everything. + +\(fn SITE QUERY &optional TAGS EXCLUDED-TAGS)" t nil) + +(autoload 'sx-search-tag-at-point "sx-search" "\ +Follow tag under position POS or point. + +\(fn &optional POS)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-search" '("sx-search-"))) + +;;;*** + +;;;### (autoloads nil "sx-site" "sx-site.el" (0 0 0 0)) +;;; Generated autoloads from sx-site.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-site" '("sx-site-"))) + +;;;*** + +;;;### (autoloads nil "sx-switchto" "sx-switchto.el" (0 0 0 0)) +;;; Generated autoloads from sx-switchto.el + +(define-prefix-command 'sx-switchto-map) + +;;;*** + +;;;### (autoloads nil "sx-tab" "sx-tab.el" (0 0 0 0)) +;;; Generated autoloads from sx-tab.el + +(autoload 'sx-tab-all-questions "sx-tab" nil t) + +(autoload 'sx-tab-unanswered "sx-tab" nil t) + +(autoload 'sx-tab-unanswered-my-tags "sx-tab" nil t) + +(autoload 'sx-tab-featured "sx-tab" nil t) + +(autoload 'sx-tab-starred "sx-tab" nil t) + +(autoload 'sx-tab-frontpage "sx-tab" nil t) + +(autoload 'sx-tab-newest "sx-tab" nil t) + +(autoload 'sx-tab-topvoted "sx-tab" nil t) + +(autoload 'sx-tab-hot "sx-tab" nil t) + +(autoload 'sx-tab-week "sx-tab" nil t) + +(autoload 'sx-tab-month "sx-tab" nil t) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-tab" '("sx-tab-"))) + +;;;*** + +;;;### (autoloads nil "sx-tag" "sx-tag.el" (0 0 0 0)) +;;; Generated autoloads from sx-tag.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-tag" '("sx-tag-"))) + +;;;*** + +;;;### (autoloads nil "sx-time" "sx-time.el" (0 0 0 0)) +;;; Generated autoloads from sx-time.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-time" '("sx-time-"))) + +;;;*** + +;;;### (autoloads nil "sx-user" "sx-user.el" (0 0 0 0)) +;;; Generated autoloads from sx-user.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sx-user" '("sx-"))) + +;;;*** + +;;;### (autoloads nil nil ("sx-load.el" "sx-pkg.el") (0 0 0 0)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; sx-autoloads.el ends here diff --git a/elpa/sx-20150702.818/sx-babel.el b/elpa/sx-20180606.736/sx-babel.el similarity index 99% rename from elpa/sx-20150702.818/sx-babel.el rename to elpa/sx-20180606.736/sx-babel.el index 7f84fe06..7ed4e4c4 100644 --- a/elpa/sx-20150702.818/sx-babel.el +++ b/elpa/sx-20180606.736/sx-babel.el @@ -1,6 +1,6 @@ ;;; sx-babel.el --- font-locking pre blocks according to language -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba diff --git a/elpa/sx-20150702.818/sx-button.el b/elpa/sx-20180606.736/sx-button.el similarity index 94% rename from elpa/sx-20150702.818/sx-button.el rename to elpa/sx-20180606.736/sx-button.el index 05ebadb1..a2086334 100644 --- a/elpa/sx-20150702.818/sx-button.el +++ b/elpa/sx-20180606.736/sx-button.el @@ -1,6 +1,6 @@ ;;; sx-button.el --- defining buttons -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -45,6 +45,12 @@ (require 'sx) (require 'sx-question) +(declare-function sx-accept "sx-interaction") +(declare-function sx-answer "sx-interaction") +(declare-function sx-comment "sx-interaction") +(declare-function sx-open-link "sx-interaction") +(declare-function sx-question-mode-hide-show-section "sx-question-mode") + ;;; Face (defface sx-custom-button @@ -87,7 +93,7 @@ usually part of a code-block." ;; Buttons receive markers. (when (markerp text-or-marker) (setq majormode (get-text-property text-or-marker 'sx-mode)) - (unless (setq text-or-marker + (unless (setq text-or-marker (get-text-property text-or-marker 'sx-button-copy)) (sx-message "Nothing of interest here."))) (with-current-buffer (pop-to-buffer (generate-new-buffer @@ -111,9 +117,9 @@ usually part of a code-block." ;;; Help-echo definitions (defconst sx-button--help-echo - (concat "mouse-1, RET" + (concat "mouse-1, RET" (propertize ": %s -- " 'face 'minibuffer-prompt) - "w" + "w" (propertize ": copy %s" 'face 'minibuffer-prompt)) "Base help-echo on which others can be written.") diff --git a/elpa/sx-20150702.818/sx-cache.el b/elpa/sx-20180606.736/sx-cache.el similarity index 99% rename from elpa/sx-20150702.818/sx-cache.el rename to elpa/sx-20180606.736/sx-cache.el index 4770fc2c..30d9d5a8 100644 --- a/elpa/sx-20150702.818/sx-cache.el +++ b/elpa/sx-20180606.736/sx-cache.el @@ -1,6 +1,6 @@ ;;; sx-cache.el --- caching -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred diff --git a/elpa/sx-20150702.818/sx-compose.el b/elpa/sx-20180606.736/sx-compose.el similarity index 99% rename from elpa/sx-20150702.818/sx-compose.el rename to elpa/sx-20180606.736/sx-compose.el index e3f9c002..28f5693a 100644 --- a/elpa/sx-20150702.818/sx-compose.el +++ b/elpa/sx-20180606.736/sx-compose.el @@ -1,6 +1,6 @@ ;;; sx-compose.el --- major-mode for composing questions and answers -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba diff --git a/elpa/sx-20150702.818/sx-encoding.el b/elpa/sx-20180606.736/sx-encoding.el similarity index 97% rename from elpa/sx-20150702.818/sx-encoding.el rename to elpa/sx-20180606.736/sx-encoding.el index 3ce1d6b3..a7ec78c7 100644 --- a/elpa/sx-20150702.818/sx-encoding.el +++ b/elpa/sx-20180606.736/sx-encoding.el @@ -1,6 +1,6 @@ ;;; sx-encoding.el --- encoding -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred @@ -152,8 +152,10 @@ numbers identifying the gzip file format. See URL `http://www.gzip.org/zlib/rfc-gzip.html'." ;; Credit: http://emacs.stackexchange.com/a/2978 - (equal (substring (string-as-unibyte data) 0 2) - (unibyte-string 31 139))) + (let ((unidata (string-as-unibyte data))) + (when (<= 2 (length unidata)) + (equal (substring unidata 0 2) + (unibyte-string 31 139))))) (defun sx-encoding-gzipped-buffer-p (buffer) "Check if BUFFER is gzip-compressed. diff --git a/elpa/sx-20150702.818/sx-favorites.el b/elpa/sx-20180606.736/sx-favorites.el similarity index 98% rename from elpa/sx-20150702.818/sx-favorites.el rename to elpa/sx-20180606.736/sx-favorites.el index 444df29d..925e182a 100644 --- a/elpa/sx-20150702.818/sx-favorites.el +++ b/elpa/sx-20180606.736/sx-favorites.el @@ -1,6 +1,6 @@ ;;; sx-favorites.el --- starred questions -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred diff --git a/elpa/sx-20150702.818/sx-filter.el b/elpa/sx-20180606.736/sx-filter.el similarity index 97% rename from elpa/sx-20150702.818/sx-filter.el rename to elpa/sx-20180606.736/sx-filter.el index 5848e348..e21959b8 100644 --- a/elpa/sx-20150702.818/sx-filter.el +++ b/elpa/sx-20180606.736/sx-filter.el @@ -1,6 +1,6 @@ ;;; sx-filter.el --- handles retrieval of filters -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred @@ -36,7 +36,7 @@ ;;; Customizations (defvar sx--filter-alist - (sx-cache-get 'filter) + nil "An alist of known filters. See `sx-filter-compile'. Structure: @@ -96,6 +96,8 @@ be returned. Otherwise, compile INCLUDE, EXCLUDE, and BASE into a filter with `sx-filter-compile' and push the association onto `sx--filter-alist'. Re-cache the alist with `sx-cache-set' and return the compiled filter." + (unless sx--filter-alist + (setq sx--filter-alist (sx-cache-get 'filter))) (or (cdr (assoc (list include exclude base) sx--filter-alist)) (let ((filter (sx-filter-compile include exclude base))) (when filter diff --git a/elpa/sx-20150702.818/sx-inbox.el b/elpa/sx-20180606.736/sx-inbox.el similarity index 90% rename from elpa/sx-20150702.818/sx-inbox.el rename to elpa/sx-20180606.736/sx-inbox.el index 61145163..593128a3 100644 --- a/elpa/sx-20150702.818/sx-inbox.el +++ b/elpa/sx-20180606.736/sx-inbox.el @@ -1,6 +1,6 @@ ;;; sx-inbox.el --- base inbox logic -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -56,6 +56,12 @@ :type 'integer :group 'sx) +(defface sx-inbox-item-type + '((t :inherit font-lock-keyword-face)) "") + +(defface sx-inbox-item-type-unread + '((t :inherit font-lock-keyword-face :weight bold)) "") + (defun sx-inbox-get (&optional notifications page keywords) "Get an array of inbox items for the current user. If NOTIFICATIONS is non-nil, query from `notifications' method, @@ -159,23 +165,24 @@ is an alist containing the elements: (replace-regexp-in-string "_" " " (or .item_type .notification_type))) (cond (.answer_id " on Answer at:") - (.question_id " on:"))) - 'face 'font-lock-keyword-face) + (.question_id " on:") + (t ":"))) + 'face (if .is_unread 'sx-inbox-item-type-unread 'sx-inbox-item-type)) (list (concat (sx-time-since .creation_date) sx-question-list-ago-string) 'face 'sx-question-list-date) (list - (propertize - " " 'display - (concat "\n " (propertize .title 'face 'sx-question-list-date) "\n" + (propertize " " 'display + (concat " " (propertize (or .title "") 'face 'sx-question-list-date) "\n" + (when .body (let ((col fill-column)) (with-temp-buffer (setq fill-column col) - (insert " " .body) + (insert " " .body) (fill-region (point-min) (point-max)) (buffer-string)))) - 'face 'default)))))) + "\n" ) 'face (if .is_unread 'bold 'default) )))))) ;;; Entry commands diff --git a/elpa/sx-20150702.818/sx-interaction.el b/elpa/sx-20180606.736/sx-interaction.el similarity index 96% rename from elpa/sx-20150702.818/sx-interaction.el rename to elpa/sx-20180606.736/sx-interaction.el index ec117105..2e2ef576 100644 --- a/elpa/sx-20150702.818/sx-interaction.el +++ b/elpa/sx-20180606.736/sx-interaction.el @@ -1,6 +1,6 @@ ;;; sx-interaction.el --- voting, commenting, and other interaction -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -188,7 +188,8 @@ If DATA is a question, also mark it as read." (sx-question--mark-read data) (sx--maybe-update-display))))) -(defun sx-open-link (link) +;;;###autoload +(defun sx-open-link (link &optional _) "Visit element given by LINK inside Emacs. Element can be a question, answer, or comment." (interactive @@ -215,9 +216,28 @@ Element can be a question, answer, or comment." (sx-display-question (sx-question-get-question .site_par .id) 'focus)) (t (error "Don't know how to open this link, please file a bug report: %s" - link) + link) nil)))))) +;;;###autoload +(defun sx-org-get-link () + "Add a link to this post to Org's memory." + (when (memq major-mode '(sx-question-mode sx-question-list-mode)) + (sx-assoc-let (sx--data-here) + (when .link + (org-store-link-props :type 'http + :link .link + :description .title))))) + +(eval-after-load "org" + '(cond + ((fboundp 'org-link-set-parameters) + (org-link-set-parameters + "sx" :store #'sx-org-get-link)) + ((boundp 'org-store-link-functions) + (add-to-list 'org-store-link-functions + #'sx-org-get-link)))) + ;;; Displaying (defun sx-display (&optional data) diff --git a/elpa/sx-20150702.818/sx-load.el b/elpa/sx-20180606.736/sx-load.el similarity index 96% rename from elpa/sx-20150702.818/sx-load.el rename to elpa/sx-20180606.736/sx-load.el index 003f965a..94abdd9b 100644 --- a/elpa/sx-20150702.818/sx-load.el +++ b/elpa/sx-20180606.736/sx-load.el @@ -1,6 +1,6 @@ ;;; sx-load.el --- load all files of the SX package -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba diff --git a/elpa/sx-20150702.818/sx-method.el b/elpa/sx-20180606.736/sx-method.el similarity index 99% rename from elpa/sx-20150702.818/sx-method.el rename to elpa/sx-20180606.736/sx-method.el index 98d510b7..7823f5e9 100644 --- a/elpa/sx-20150702.818/sx-method.el +++ b/elpa/sx-20180606.736/sx-method.el @@ -1,6 +1,6 @@ ;;; sx-method.el --- method calls -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred diff --git a/elpa/sx-20150702.818/sx-networks.el b/elpa/sx-20180606.736/sx-networks.el similarity index 97% rename from elpa/sx-20150702.818/sx-networks.el rename to elpa/sx-20180606.736/sx-networks.el index 8bd9d34d..1f07abaa 100644 --- a/elpa/sx-20150702.818/sx-networks.el +++ b/elpa/sx-20180606.736/sx-networks.el @@ -1,6 +1,6 @@ ;;; sx-networks.el --- user network information -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred @@ -78,7 +78,7 @@ If cache is not available, retrieve current data." "Update user information. Sets cache and then uses `sx-network--get-associated' to update the variables." - (setq sx-network--user-information + (setq sx-network--user-information (sx-method-call 'me :submethod 'associated :keywords '((types . (main_site meta_site))) diff --git a/elpa/sx-20150702.818/sx-notify.el b/elpa/sx-20180606.736/sx-notify.el similarity index 98% rename from elpa/sx-20150702.818/sx-notify.el rename to elpa/sx-20180606.736/sx-notify.el index 24aa9b75..50daf811 100644 --- a/elpa/sx-20150702.818/sx-notify.el +++ b/elpa/sx-20180606.736/sx-notify.el @@ -1,6 +1,6 @@ ;;; sx-notify.el --- mode-line notifications -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba diff --git a/elpa/sx-20180606.736/sx-pkg.el b/elpa/sx-20180606.736/sx-pkg.el new file mode 100644 index 00000000..c8e88aee --- /dev/null +++ b/elpa/sx-20180606.736/sx-pkg.el @@ -0,0 +1,16 @@ +(define-package "sx" "20180606.736" "StackExchange client. Ask and answer questions on Stack Overflow, Super User, and the likes" + '((emacs "24.1") + (cl-lib "0.5") + (json "1.3") + (markdown-mode "2.0") + (let-alist "1.0.3")) + :keywords + '("help" "hypermedia" "tools") + :authors + '(("Sean Allred" . "code@seanallred.com")) + :maintainer + '("Sean Allred" . "code@seanallred.com") + :url "https://github.com/vermiculus/sx.el/") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/sx-20150702.818/sx-question-list.el b/elpa/sx-20180606.736/sx-question-list.el similarity index 99% rename from elpa/sx-20150702.818/sx-question-list.el rename to elpa/sx-20180606.736/sx-question-list.el index ea910454..40283031 100644 --- a/elpa/sx-20150702.818/sx-question-list.el +++ b/elpa/sx-20180606.736/sx-question-list.el @@ -1,6 +1,6 @@ ;;; sx-question-list.el --- major-mode for navigating questions list -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -206,7 +206,7 @@ This variable gets reset to 0 before every refresh. It should be used by `sx-question-list--next-page-function'.") (make-variable-buffer-local 'sx-question-list--pages-so-far) -(defvar sx-question-list--refresh-function nil +(defvar sx-question-list--refresh-function nil "Function used to refresh the list of questions to be displayed. Used by `sx-question-list-mode', this is a function, called with no arguments, which returns a list questions to be displayed, @@ -525,7 +525,7 @@ that may currently be there." (interactive "p") (sx-question-list-next n) (sx-question-mode--display - (tabulated-list-get-id) + (tabulated-list-get-id) (sx-question-list--create-question-window))) (defun sx-question-list--create-question-window () diff --git a/elpa/sx-20150702.818/sx-question-mode.el b/elpa/sx-20180606.736/sx-question-mode.el similarity index 98% rename from elpa/sx-20150702.818/sx-question-mode.el rename to elpa/sx-20180606.736/sx-question-mode.el index 92763815..0b4d9eef 100644 --- a/elpa/sx-20150702.818/sx-question-mode.el +++ b/elpa/sx-20180606.736/sx-question-mode.el @@ -1,6 +1,6 @@ ;;; sx-question-mode.el --- major-mode for displaying questions -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -53,11 +53,11 @@ Common values for this variable are `pop-to-buffer' and `switch-to-buffer'." (defun sx-question-mode--get-window () "Return a window displaying a question, or nil." - (car-safe - (cl-member-if - (lambda (x) (with-selected-window x - (derived-mode-p 'sx-question-mode))) - (window-list nil 'never nil)))) + (get-window-with-predicate + (lambda (win) + (with-selected-window win + (derived-mode-p 'sx-question-mode))) + 'never)) (defun sx-question-mode--display (data &optional window) "Display question given by DATA on WINDOW. @@ -243,6 +243,7 @@ on the current buffer use \\{sx-question-mode}" (setq header-line-format sx-question-mode--header-line) (setq mode-line-format sx-question-mode--mode-line) + (buffer-disable-undo (current-buffer)) (set (make-local-variable 'nobreak-char-display) nil) ;; Determine how to close this window. (unless (window-parameter nil 'quit-restore) diff --git a/elpa/sx-20150702.818/sx-question-print.el b/elpa/sx-20180606.736/sx-question-print.el similarity index 87% rename from elpa/sx-20150702.818/sx-question-print.el rename to elpa/sx-20180606.736/sx-question-print.el index 5b5ef4fa..22226b3c 100644 --- a/elpa/sx-20150702.818/sx-question-print.el +++ b/elpa/sx-20180606.736/sx-question-print.el @@ -1,6 +1,6 @@ ;;; sx-question-print.el --- populating the question-mode buffer with content -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -185,10 +185,10 @@ replaced with the comment." ("Newer" . sx-answer-newer-p) ("More active" . sx-answer-more-active-p)))) (append (mapcar (lambda (x) (cons (concat (car x) " first") (cdr x))) - methods) + methods) (mapcar (lambda (x) (cons (concat (car x) " last") - (sx--invert-predicate (cdr x)))) - methods)))) + (sx--invert-predicate (cdr x)))) + methods)))) (defcustom sx-question-mode-answer-sort-function #'sx-answer-higher-score-p @@ -196,12 +196,10 @@ replaced with the comment." :type (cons 'choice (mapcar (lambda (x) `(const :tag ,(car x) ,(cdr x))) - sx-question-mode--sort-methods)) + sx-question-mode--sort-methods)) :group 'sx-question-mode) -(defcustom sx-question-mode-use-images - (eval-when-compile - (image-type-available-p 'imagemagick)) +(defcustom sx-question-mode-use-images (image-type-available-p 'imagemagick) "Non-nil if SX should download and display images. By default, this is `t' if the `imagemagick' image type is available (checked with `image-type-available-p'). If this image @@ -214,6 +212,13 @@ type is not available, images won't work." :type 'integer :group 'sx-question-mode) +(defvar sx-question-mode-after-print-hook nil + "Hook run after the question has been printed. +The hook functions are called without arguments with +the `sx-question-mode' buffer current. +The special variable `inhibit-read-only' is t while the hook functions run. +This hook can be used for special formatting of parts of the question buffer.") + ;;; Functions ;;;; Printing the general structure @@ -237,11 +242,12 @@ QUESTION must be a data structure returned by `json-read'." (sx-question-mode--print-close-reason .closed_reason .closed_date .closed_details)) (sx-question-mode--print-section question) (mapc #'sx-question-mode--print-section - (cl-remove-if - #'sx--deleted-p - (cl-sort .answers sx-question-mode-answer-sort-function)))) + (cl-remove-if + #'sx--deleted-p + (cl-sort .answers sx-question-mode-answer-sort-function)))) (insert "\n\n ") (insert-text-button "Write an Answer" :type 'sx-button-answer) + (run-hooks 'sx-question-mode-after-print-hook) ;; Go up (goto-char (point-min)) (sx-question-mode-next-section)) @@ -255,9 +261,9 @@ DETAILS, when given is an alist further describing the close." (let-alist details (insert "\n " (propertize (format " %s as %s, %s ago. " - (if .on_hold "Put on hold" "Closed") - reason - (sx-time-since date)) + (if .on_hold "Put on hold" "Closed") + reason + (sx-time-since date)) 'face 'sx-question-mode-closed) "\n") (when .description @@ -321,8 +327,8 @@ DATA can represent a question or an answer." (sx-time-seconds-to-date .creation_date) (when .last_edit_date (format sx-question-mode-last-edit-format - (sx-time-since .last_edit_date) - (sx-user--format "%d" .last_editor)))) + (sx-time-since .last_edit_date) + (sx-user--format "%d" .last_editor)))) 'sx-question-mode-date) ;; Score and upvoted/downvoted status. @@ -393,18 +399,18 @@ The comment is indented, filled, and then printed according to " ")) (insert (format sx-question-mode-comments-format - (sx-user--format "%d" .owner) - (substring - ;; We use temp buffer, so that image overlays don't get - ;; inserted with the comment. - (with-temp-buffer - ;; We fill with three spaces at the start, so the comment is - ;; slightly indented. - (sx-question-mode--insert-markdown (concat " " (sx--squash-whitespace .body_markdown))) - (buffer-string)) - ;; Then we remove the spaces from the first line, since we'll - ;; add the username there anyway. - 3)))))) + (sx-user--format "%d" .owner) + (substring + ;; We use temp buffer, so that image overlays don't get + ;; inserted with the comment. + (with-temp-buffer + ;; We fill with three spaces at the start, so the comment is + ;; slightly indented. + (sx-question-mode--insert-markdown (concat " " (sx--squash-whitespace .body_markdown))) + (buffer-string)) + ;; Then we remove the spaces from the first line, since we'll + ;; add the username there anyway. + 3)))))) (defun sx-question-mode--insert-header (&rest args) "Insert propertized ARGS. @@ -478,7 +484,7 @@ font-locks code-blocks according to mode." "\f\\|[ \t]*$\\|[ \t]*[*+-] \\|[ \t]*[0-9]+\\.[ \t]\\|[ \t]*: ") (paragraph-separate "\\(?:[ \t\f]*\\|.* \\)$") (adaptive-fill-first-line-regexp "\\`[ \t]*>[ \t]*?\\'") - (adaptive-fill-function #'markdown-adaptive-fill-function)) + (adaptive-fill-function #'markdown-adaptive-fill-function)) (save-restriction (narrow-to-region beg end) ;; html tags can span many paragraphs, so we handle them @@ -506,6 +512,10 @@ font-locks code-blocks according to mode." (goto-char end))))) (goto-char (point-max))))) +(defconst sx-question-mode-hr + (propertize (make-string 72 ?―) + 'face 'markdown-header-rule-face)) + (defun sx-question-mode--insert-markdown (text) "Return TEXT fontified according to `markdown-mode'." (let ((beg (point))) @@ -535,7 +545,8 @@ font-locks code-blocks according to mode." `((,(rx (or blank line-start) (group-n 1 (and "@" (1+ (not space)))) symbol-end) - 1 font-lock-builtin-face))) + 1 font-lock-builtin-face) + ("^---+$" 0 '(face nil display ,sx-question-mode-hr)))) ;; Everything. (font-lock-fontify-region (point-min) (point-max)) (replace-regexp-in-string "[[:blank:]]+\\'" "" (buffer-string)))) @@ -569,10 +580,25 @@ font-locks code-blocks according to mode." "Return non-nil if point is inside code. This can be inline Markdown code or a Markdown code-block." (save-match-data - (or (markdown-code-at-point-p) + (or (markdown-inline-code-at-point-p) (save-excursion (sx-question-mode--skip-and-fontify-pre 'dont-fontify))))) +(defun sx-question-mode--standalone-tag-p (string) + "Return non-nil if STRING ends in \"/>\"." + (string-match "/[[:blank:]]*>\\'" string)) + +(defun sx-question-mode--next-tag (tag &optional closing end) + "Move point to the next occurrence of html TAG, or return nil. +Don't move past END. +If CLOSING is non-nil, find a closing tag." + (search-forward-regexp + (format sx-question-mode--html-tag-regexp + (if closing + (concat "/[[:blank:]]*" tag) + tag)) + end 'noerror)) + (defun sx-question-mode--process-html-tags (beg end-marker) "Hide all html tags between BEG and END and possibly interpret them. END-MARKER should be a marker." @@ -580,17 +606,20 @@ END-MARKER should be a marker." ;; nested in itself (e.g., ). (set-marker-insertion-type end-marker t) (goto-char beg) - (while (search-forward-regexp - (format sx-question-mode--html-tag-regexp "[[:alpha:]]+") - end-marker 'noerror) + (while (sx-question-mode--next-tag "[[:alpha:]]+" nil end-marker) (unless (sx-question-mode--inside-code-p) (let ((tag (match-string 1)) + (full (match-string 0)) (l (match-beginning 0))) (replace-match "") - (when (search-forward-regexp - (format sx-question-mode--html-tag-regexp (concat "/" tag)) - ;; Searching for a match has no bounds. - end-marker 'noerror) + (pcase tag + (`"hr" + (unless (looking-at-p "^") (insert "\n")) + (insert (propertize "---" 'display sx-question-mode-hr)) + (unless (eq (char-after) ?\n) (insert "\n"))) + (`"br" (insert "\n "))) + (when (and (not (sx-question-mode--standalone-tag-p full)) + (sx-question-mode--next-tag tag 'closing)) (let ((r (copy-marker (match-beginning 0)))) ;; The code tag is special, because it quotes everything inside. (if (string= tag "code") @@ -599,18 +628,18 @@ END-MARKER should be a marker." (replace-match "") ;; Handle stuff between the two tags. (save-match-data (sx-question-mode--process-html-tags l r)) - (cond - ((string= tag "kbd") - (add-text-properties l r '(face sx-question-mode-kbd-tag)) - (when (looking-at-p - (format sx-question-mode--html-tag-regexp "kbd")) - (insert " "))) - ((string= tag "sub") - (add-text-properties - l r '(face sx-question-mode-sub-sup-tag display (raise -0.3)))) - ((string= tag "sup") - (add-text-properties - l r '(face sx-question-mode-sub-sup-tag display (raise +0.3)))))))))))) + (pcase tag + (`"kbd" + (add-text-properties l r '(face sx-question-mode-kbd-tag)) + (when (looking-at-p + (format sx-question-mode--html-tag-regexp "kbd")) + (insert " "))) + (`"sub" + (add-text-properties + l r '(face sx-question-mode-sub-sup-tag display (raise -0.3)))) + (`"sup" + (add-text-properties + l r '(face sx-question-mode-sub-sup-tag display (raise +0.3)))))))))))) ;;; Handling links @@ -693,11 +722,11 @@ URL is used as 'help-echo and 'url properties." ;; Mouse-over 'help-echo (format sx-button--link-help-echo - ;; If TEXT is a shortened url, we don't shorten URL. - (propertize (if (and (stringp text) - (string-match "^https?:" text)) - url (sx--shorten-url url)) - 'face 'font-lock-function-name-face)) + ;; If TEXT is a shortened url, we don't shorten URL. + (propertize (if (and (stringp text) + (string-match "^https?:" text)) + url (sx--shorten-url url)) + 'face 'font-lock-function-name-face)) ;; For visiting and stuff. 'sx-button-url url 'sx-button-copy url @@ -715,7 +744,7 @@ If ID is nil, use FALLBACK-ID instead." (goto-char (point-min)) (when (search-forward-regexp (format sx-question-mode--reference-regexp - (or id fallback-id)) + (or id fallback-id)) nil t) (match-string-no-properties 1))))) @@ -751,6 +780,8 @@ move point, don't create the code-block button." (let ((beg (line-beginning-position))) ;; To identify code-blocks we need to be at start of line. (goto-char beg) + (when (fboundp 'markdown-syntax-propertize) + (markdown-syntax-propertize (point) (point-max))) (when (markdown-match-pre-blocks (line-end-position)) (unless dont-fontify (sx-babel--make-pre-button beg (point))) diff --git a/elpa/sx-20150702.818/sx-question.el b/elpa/sx-20180606.736/sx-question.el similarity index 99% rename from elpa/sx-20150702.818/sx-question.el rename to elpa/sx-20180606.736/sx-question.el index 7c2b1e9b..57dd7dd3 100644 --- a/elpa/sx-20150702.818/sx-question.el +++ b/elpa/sx-20180606.736/sx-question.el @@ -1,6 +1,6 @@ ;;; sx-question.el --- question logic -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred diff --git a/elpa/sx-20150702.818/sx-request.el b/elpa/sx-20180606.736/sx-request.el similarity index 99% rename from elpa/sx-20150702.818/sx-request.el rename to elpa/sx-20180606.736/sx-request.el index 10bec4a4..9376c1d9 100644 --- a/elpa/sx-20150702.818/sx-request.el +++ b/elpa/sx-20180606.736/sx-request.el @@ -1,6 +1,6 @@ ;;; sx-request.el --- requests and url manipulation -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred diff --git a/elpa/sx-20150702.818/sx-search.el b/elpa/sx-20180606.736/sx-search.el similarity index 99% rename from elpa/sx-20150702.818/sx-search.el rename to elpa/sx-20180606.736/sx-search.el index 885cb53d..8ab99232 100644 --- a/elpa/sx-20150702.818/sx-search.el +++ b/elpa/sx-20180606.736/sx-search.el @@ -1,6 +1,6 @@ ;;; sx-search.el --- searching for questions -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -107,7 +107,7 @@ prefix argument, the user is asked for everything." (setq excluded-tags (sx-tag-multiple-read site "Excluded tags (optional)"))) (list site query tags excluded-tags))) - + ;; Here starts the actual function (sx-initialize) (with-current-buffer (get-buffer-create "*sx-search-result*") diff --git a/elpa/sx-20150702.818/sx-site.el b/elpa/sx-20180606.736/sx-site.el similarity index 97% rename from elpa/sx-20150702.818/sx-site.el rename to elpa/sx-20180606.736/sx-site.el index 4dac8e62..c8a16530 100644 --- a/elpa/sx-20150702.818/sx-site.el +++ b/elpa/sx-20180606.736/sx-site.el @@ -1,6 +1,6 @@ ;;; sx-site.el --- browsing sites -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred diff --git a/elpa/sx-20150702.818/sx-switchto.el b/elpa/sx-20180606.736/sx-switchto.el similarity index 97% rename from elpa/sx-20150702.818/sx-switchto.el rename to elpa/sx-20180606.736/sx-switchto.el index 718a941e..504c12b1 100644 --- a/elpa/sx-20150702.818/sx-switchto.el +++ b/elpa/sx-20180606.736/sx-switchto.el @@ -1,6 +1,6 @@ ;;; sx-switchto.el --- keymap for navigating between pages -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba diff --git a/elpa/sx-20150702.818/sx-tab.el b/elpa/sx-20180606.736/sx-tab.el similarity index 84% rename from elpa/sx-20150702.818/sx-tab.el rename to elpa/sx-20180606.736/sx-tab.el index 98b1b262..69e85be8 100644 --- a/elpa/sx-20150702.818/sx-tab.el +++ b/elpa/sx-20180606.736/sx-tab.el @@ -1,6 +1,6 @@ ;;; sx-tab.el --- functions for viewing different tabs -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba @@ -149,42 +149,27 @@ variables, but before refreshing the display." (setq sx-question-list--order-methods sx-tab--order-methods)) ;;;###autoload -(autoload 'sx-tab-all-questions - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-all-questions "sx-tab" nil t) (sx-tab--define "Unanswered" (sx-question-list--make-pager 'questions 'unanswered)) ;;;###autoload -(autoload 'sx-tab-unanswered - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-unanswered "sx-tab" nil t) (sx-tab--define "Unanswered-My-Tags" (sx-question-list--make-pager 'questions 'unanswered/my-tags)) ;;;###autoload -(autoload 'sx-tab-unanswered-my-tags - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-unanswered-my-tags "sx-tab" nil t) (sx-tab--define "Featured" (sx-question-list--make-pager 'questions 'featured)) ;;;###autoload -(autoload 'sx-tab-featured - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-featured "sx-tab" nil t) (sx-tab--define "Starred" (sx-question-list--make-pager 'me 'favorites)) ;;;###autoload -(autoload 'sx-tab-starred - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-starred "sx-tab" nil t) ;;; Inter-modes navigation @@ -213,10 +198,7 @@ belongs to." (setq sx-question-list--order-methods sx-tab--order-methods)) ;;;###autoload -(autoload 'sx-tab-frontpage - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-frontpage "sx-tab" nil t) (sx-tab--define "Newest" sx-tab--basic-question-pager @@ -225,10 +207,7 @@ belongs to." (setq sx-question-list--order-methods sx-tab--order-methods)) ;;;###autoload -(autoload 'sx-tab-newest - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-newest "sx-tab" nil t) (sx-tab--define "TopVoted" sx-tab--basic-question-pager @@ -237,10 +216,7 @@ belongs to." (setq sx-question-list--order-methods sx-tab--order-methods)) ;;;###autoload -(autoload 'sx-tab-topvoted - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-topvoted "sx-tab" nil t) (sx-tab--define "Hot" sx-tab--basic-question-pager @@ -249,10 +225,7 @@ belongs to." (setq sx-question-list--order-methods sx-tab--order-methods)) ;;;###autoload -(autoload 'sx-tab-hot - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-hot "sx-tab" nil t) (sx-tab--define "Week" sx-tab--basic-question-pager @@ -261,10 +234,7 @@ belongs to." (setq sx-question-list--order-methods sx-tab--order-methods)) ;;;###autoload -(autoload 'sx-tab-week - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-week "sx-tab" nil t) (sx-tab--define "Month" sx-tab--basic-question-pager @@ -273,10 +243,7 @@ belongs to." (setq sx-question-list--order-methods sx-tab--order-methods)) ;;;###autoload -(autoload 'sx-tab-month - (expand-file-name - "sx-tab" (when load-file-name (file-name-directory load-file-name))) - nil t) +(autoload 'sx-tab-month "sx-tab" nil t) (provide 'sx-tab) ;;; sx-tab.el ends here diff --git a/elpa/sx-20150702.818/sx-tag.el b/elpa/sx-20180606.736/sx-tag.el similarity index 100% rename from elpa/sx-20150702.818/sx-tag.el rename to elpa/sx-20180606.736/sx-tag.el diff --git a/elpa/sx-20150702.818/sx-time.el b/elpa/sx-20180606.736/sx-time.el similarity index 98% rename from elpa/sx-20150702.818/sx-time.el rename to elpa/sx-20180606.736/sx-time.el index 9fa00373..00e381a2 100644 --- a/elpa/sx-20150702.818/sx-time.el +++ b/elpa/sx-20180606.736/sx-time.el @@ -1,6 +1,6 @@ ;;; sx-time.el --- time -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred diff --git a/elpa/sx-20150702.818/sx-user.el b/elpa/sx-20180606.736/sx-user.el similarity index 99% rename from elpa/sx-20150702.818/sx-user.el rename to elpa/sx-20180606.736/sx-user.el index e00ca2dd..9bfc93fa 100644 --- a/elpa/sx-20150702.818/sx-user.el +++ b/elpa/sx-20180606.736/sx-user.el @@ -1,6 +1,6 @@ ;;; sx-user.el --- handling and printing user information -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Artur Malabarba +;; Copyright (C) 2014-2018 Artur Malabarba ;; Author: Artur Malabarba diff --git a/elpa/sx-20150702.818/sx.el b/elpa/sx-20180606.736/sx.el similarity index 98% rename from elpa/sx-20150702.818/sx.el rename to elpa/sx-20180606.736/sx.el index ea5311cd..66beeaa8 100644 --- a/elpa/sx-20150702.818/sx.el +++ b/elpa/sx-20180606.736/sx.el @@ -1,6 +1,6 @@ ;;; sx.el --- StackExchange client. Ask and answer questions on Stack Overflow, Super User, and the likes -*- lexical-binding: t; -*- -;; Copyright (C) 2014 Sean Allred +;; Copyright (C) 2014-2018 Sean Allred ;; Author: Sean Allred ;; URL: https://github.com/vermiculus/sx.el/ @@ -48,7 +48,9 @@ (defun sx-bug-report () "File a bug report about the `sx' package." (interactive) - (browse-url "https://github.com/vermiculus/sx.el/issues/new")) + (if (featurep 'magithub) + (magithub-issue-new (magithub-repo "vermiculus/sx.el")) + (browse-url "https://github.com/vermiculus/sx.el/issues/new"))) ;;; Site @@ -392,7 +394,7 @@ Return the result of BODY." "Use FORMAT-STRING to format the values in ALIST. ALIST is a list with elements of the form (CHAR . STRING). The value is a copy of FORMAT-STRING, but with certain constructs -replaced by text as given by ALIST. +replaced by text as given by ALIST. The construct is a `%' character followed by any other character. The replacement is the STRING corresponding to CHAR in ALIST. In -- 2.47.3