(defconst sc-emacs-features
(let ((version 'v18)
(flavor 'GNU))
- (if (or
- (string= (substring emacs-version 0 2) "19")
- (string= (substring emacs-version 0 2) "20"))
+ (if (not
+ (string= (substring emacs-version 0 2) "18"))
(setq version 'v19))
(if (string-match "Lucid" emacs-version)
(setq flavor 'Lucid))
"A list describing what version of Emacs we're running on.
Known flavors are:
-Emacs 18 : (v18 GNU)
-Emacs 19 or 20 : (v19 GNU)
-Lucid 19 or 20 : (v19 Lucid)")
+Emacs 18 : (v18 GNU)
+Emacs 19 or later : (v19 GNU)
+Lucid 19 or later : (v19 Lucid)")
(defvar sc-tmp-nested-regexp nil
(setq sc-attrib-or-cite nil) ; nil==attribution, t==citation
(while
(catch 'sc-reconfirm
- (string= "" (setq choice
- (if sc-attrib-or-cite
- (sc-read-string
- "Enter citation prefix: "
- citation
- 'sc-citation-confirmation-history)
- (sc-completing-read
- "Complete attribution name: "
- query-alist nil nil
- (cons initial 0)
- 'sc-attribution-confirmation-history)
- )))))
+ (progn
+ (setq choice
+ (if sc-attrib-or-cite
+ (sc-read-string
+ "Enter citation prefix: "
+ citation
+ 'sc-citation-confirmation-history)
+ (sc-completing-read
+ "Complete attribution name: "
+ query-alist nil nil
+ (cons initial 0)
+ 'sc-attribution-confirmation-history)
+ ))
+ nil)))
(if sc-attrib-or-cite
;; since the citation was chosen, we have to guess at
;; the attribution
(defun sc-toggle-var (variable)
"Boolean toggle VARIABLE's value.
-VARIABLE must be a bound symbol. Nil values change to t, non-nil
+VARIABLE must be a bound symbol. nil values change to t, non-nil
values are changed to nil."
(message "%s changed from %s to %s"
variable (symbol-value variable)
- (set-variable variable (not (eval-expression variable))))
+ (set variable (not (symbol-value variable))))
(sc-set-mode-string))
(defun sc-set-variable (var)