diff options
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/artist.el | 23 | ||||
-rw-r--r-- | lisp/textmodes/bibtex-style.el | 2 | ||||
-rw-r--r-- | lisp/textmodes/bibtex.el | 2 | ||||
-rw-r--r-- | lisp/textmodes/css-mode.el | 2 | ||||
-rw-r--r-- | lisp/textmodes/fill.el | 25 | ||||
-rw-r--r-- | lisp/textmodes/ispell.el | 6 | ||||
-rw-r--r-- | lisp/textmodes/reftex-auc.el | 14 | ||||
-rw-r--r-- | lisp/textmodes/reftex-vars.el | 98 | ||||
-rw-r--r-- | lisp/textmodes/remember.el | 11 | ||||
-rw-r--r-- | lisp/textmodes/rst.el | 332 | ||||
-rw-r--r-- | lisp/textmodes/sgml-mode.el | 2 | ||||
-rw-r--r-- | lisp/textmodes/table.el | 6 |
12 files changed, 251 insertions, 272 deletions
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 3d081220910..fbb9d2174fd 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -6,7 +6,7 @@ ;; Keywords: mouse ;; Old-Version: 1.2.6 ;; Release-date: 6-Aug-2004 -;; Location: http://www.lysator.liu.se/~tab/artist/ +;; Location: https://www.lysator.liu.se/~tab/artist/ ;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this ;; file on 19/3/2008, and the maintainer agreed that when a bug is filed in @@ -106,13 +106,6 @@ ;; If you add a new drawing mode, send it to me, and I would gladly ;; include in the next release! -;;; Installation: - -;; To use artist, put this in your .emacs: -;; -;; (autoload 'artist-mode "artist" "Enter artist-mode" t) - - ;;; Requirements: ;; Artist requires the `rect' package (which comes with Emacs) to be @@ -1760,13 +1753,6 @@ info-variant-part." "Call function FN with ARGS, if FN is not nil." `(if ,fn (funcall ,fn ,@args))) -(defun artist-uniq (l) - "Remove consecutive duplicates in list L. Comparison is done with `equal'." - (cond ((null l) nil) - ((null (cdr l)) l) ; only one element in list - ((equal (car l) (car (cdr l))) (artist-uniq (cdr l))) ; first 2 equal - (t (cons (car l) (artist-uniq (cdr l)))))) ; first 2 are different - (defun artist-string-split (str r) "Split string STR at occurrences of regexp R, returning a list of strings." (let ((res nil) @@ -2768,7 +2754,7 @@ to append to the end of the list, when doing free-hand drawing)." Also, the `artist-key-poly-point-list' is reversed." (setq artist-key-poly-point-list - (artist-uniq artist-key-poly-point-list)) + (seq-uniq artist-key-poly-point-list)) (if (>= (length artist-key-poly-point-list) 2) @@ -5379,10 +5365,7 @@ The event, EV, is the mouse event." (concat "Hello Tomas,\n\n" "I have a nice bug report on Artist for you! Here it is:"))))) - -;; -;; Now provide this minor mode -;; +(define-obsolete-function-alias 'artist-uniq #'seq-uniq "28.1") (provide 'artist) diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el index 820033486dc..6d01871bc52 100644 --- a/lisp/textmodes/bibtex-style.el +++ b/lisp/textmodes/bibtex-style.el @@ -49,7 +49,7 @@ "REVERSE" "SORT" "STRINGS")) (defconst bibtex-style-functions - ;; From http://www.eeng.dcu.ie/local-docs/btxdocs/btxhak/btxhak/node4.html. + ;; From https://www.eeng.dcu.ie/local-docs/btxdocs/btxhak/btxhak/node4.html. '("<" ">" "=" "+" "-" "*" ":=" "add.period$" "call.type$" "change.case$" "chr.to.int$" "cite$" "duplicate$" "empty$" "format.name$" "if$" "int.to.chr$" "int.to.str$" diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 301f7017e41..f01c66b1584 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1431,7 +1431,7 @@ If `bibtex-expand-strings' is non-nil, BibTeX strings are expanded for generating the URL. Set this variable before loading BibTeX mode. -The following is a complex example, see URL `http://link.aps.org/'. +The following is a complex example, see URL `https://link.aps.org/'. (((\"journal\" . \"\\\\=<\\(PR[ABCDEL]?\\|RMP\\)\\\\=>\") \"http://link.aps.org/abstract/%s/v%s/p%s\" diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 622853da456..47b0b517ae0 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -427,7 +427,7 @@ "paged-y" "paged-x-controls" "paged-y-controls" "fragments") ;; CSS Text Decoration Module Level 3 - ;; (http://dev.w3.org/csswg/css-text-decor-3/#property-index) + ;; (https://dev.w3.org/csswg/css-text-decor-3/#property-index) ("text-decoration" text-decoration-line text-decoration-style text-decoration-color) ("text-decoration-color" color) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 81cd2f02cd7..61514d6761b 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -412,12 +412,12 @@ and `fill-nobreak-invisible'." ;; Register `kinsoku' for scripts HAN, KANA, BOPOMOFO, and CJK-MISC. ;; Also tell that they don't use space between words. (map-char-table - #'(lambda (key val) - (when (memq val '(han kana bopomofo cjk-misc)) - (set-char-table-range fill-find-break-point-function-table - key 'kinsoku) - (set-char-table-range fill-nospace-between-words-table - key t))) + (lambda (key val) + (when (memq val '(han kana bopomofo cjk-misc)) + (set-char-table-range fill-find-break-point-function-table + key 'kinsoku) + (set-char-table-range fill-nospace-between-words-table + key t))) char-script-table) ;; Do the same thing also for full width characters and half ;; width kana variants. @@ -703,7 +703,8 @@ space does not end a sentence, so don't break a line there." (or justify (setq justify (current-justification))) ;; Don't let Adaptive Fill mode alter the fill prefix permanently. - (let ((fill-prefix fill-prefix)) + (let ((actual-fill-prefix fill-prefix) + (fill-prefix fill-prefix)) ;; Figure out how this paragraph is indented, if desired. (when (and adaptive-fill-mode (or (null fill-prefix) (string= fill-prefix ""))) @@ -717,7 +718,7 @@ space does not end a sentence, so don't break a line there." (goto-char from) (beginning-of-line) - (if (not justify) ; filling disabled: just check indentation + (if (not justify) ; filling disabled: just check indentation (progn (goto-char from) (while (< (point) to) @@ -747,12 +748,14 @@ space does not end a sentence, so don't break a line there." linebeg) (while (< (point) to) ;; On the first line, there may be text in the fill prefix - ;; zone. In that case, don't consider that area when - ;; trying to find a place to put a line break (bug#45720). + ;; zone (when `fill-prefix' is specified externally, and + ;; not computed). In that case, don't consider that area + ;; when trying to find a place to put a line break + ;; (bug#45720). (if (not first) (setq linebeg (point)) (setq first nil - linebeg (+ (point) (length fill-prefix)))) + linebeg (+ (point) (length actual-fill-prefix)))) (move-to-column (current-fill-column)) (if (when (< (point) to) ;; Find the position where we'll break the line. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index cee578fc4b8..eb521134dc4 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1207,9 +1207,9 @@ If LANG is omitted, get the extra word characters for the default language." (split-string (ispell--call-enchant-lsmod "-list-dicts") " ([^)]+)\n" t)) (found - (mapcar #'(lambda (lang) - `(,lang "[[:alpha:]]" "[^[:alpha:]]" - ,(ispell--get-extra-word-characters lang) t nil nil utf-8)) + (mapcar (lambda (lang) + `(,lang "[[:alpha:]]" "[^[:alpha:]]" + ,(ispell--get-extra-word-characters lang) t nil nil utf-8)) dictionaries))) ;; Merge into FOUND any elements from the standard ispell-dictionary-base-alist ;; which have no element in FOUND at all. diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el index 8429fce625a..977da700fd0 100644 --- a/lisp/textmodes/reftex-auc.el +++ b/lisp/textmodes/reftex-auc.el @@ -32,11 +32,12 @@ (optional prompt default &optional complete)) (declare-function TeX-argument-insert "ext:tex" (name optional &optional prefix)) -(declare-function LaTeX-add-labels "ext:tex" (&rest entries) t) -(declare-function LaTeX-add-index-entries "ext:tex" (&rest entries) t) -(declare-function LaTeX-bibitem-list "ext:tex" () t) -(declare-function LaTeX-index-entry-list "ext:tex" () t) -(declare-function LaTeX-label-list "ext:tex" () t) +(declare-function LaTeX-add-labels "ext:latex" (&rest labels) t) +(declare-function LaTeX-add-index-entries "ext:latex" (&rest index-entries) t) +(declare-function LaTeX-add-bibitems "ext:latex" (&rest bibitems) t) +(declare-function LaTeX-bibitem-list "ext:latex" () t) +(declare-function LaTeX-index-entry-list "ext:latex" () t) +(declare-function LaTeX-label-list "ext:latex" () t) (declare-function multi-prompt "ext:multi-prompt" (separator unique prompt table &optional mp-predicate require-match initial history)) @@ -69,8 +70,6 @@ What is being used depends upon `reftex-plug-into-AUCTeX'." (LaTeX-add-labels label)) (TeX-argument-insert label optional))) -(declare-function LaTeX-add-bibitems "latex") ;FIXME: Can't find the definition - ;;;###autoload (defun reftex-arg-cite (optional &optional prompt definition) "Use `reftex-citation' or AUCTeX's code to insert a cite-key macro argument. @@ -88,7 +87,6 @@ What is being used depends upon `reftex-plug-into-AUCTeX'." (TeX-argument-insert (mapconcat #'identity items reftex-cite-key-separator) optional))) - ;;;###autoload (defun reftex-arg-index-tag (optional &optional prompt &rest _args) "Prompt for an index tag with completion. diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index a65772da1a4..0d6bfb5d860 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -888,50 +888,46 @@ DOWNCASE t: Downcase words before using them." (string :tag "")) (option (boolean :tag "Downcase words ")))) -(if (featurep 'xemacs) - ;; XEmacs 21.5 doesn't have explicitly numbered matching groups, - ;; so this list mustn't get any more items. - (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}")) - (defcustom reftex-label-regexps - `(;; Normal \\label{foo} labels - "\\\\label{\\(?1:[^}]*\\)}" - ;; keyvals [..., label = {foo}, ...] forms used by ctable, - ;; listings, breqn, ... - ,(concat - ;; Make sure we search only for optional arguments of - ;; environments/macros and don't match any other [. ctable - ;; provides a macro called \ctable, beamer/breqn/listings have - ;; environments. Start with a backslash and a group for names - "\\\\\\(?:" - ;; begin, optional spaces and opening brace - "begin[[:space:]]*{" - ;; Build a regexp for env names - (regexp-opt '("lstlisting" "dmath" "dseries" "dgroup" - "darray" "frame")) - ;; closing brace, optional spaces - "}[[:space:]]*" - ;; Now for macros - "\\|" - ;; Build a regexp for macro names; currently only \ctable - (regexp-opt '("ctable")) - ;; Close the group for names - "\\)" - ;; Match the opening [ and the following chars - "\\[[^][]*" - ;; Allow nested levels of chars enclosed in braces - "\\(?:{[^}{]*" - "\\(?:{[^}{]*" - "\\(?:{[^}{]*}[^}{]*\\)*" - "}[^}{]*\\)*" - "}[^][]*\\)*" - ;; Match the label key - "\\<label[[:space:]]*=[[:space:]]*" - ;; Match the label value; braces around the value are - ;; optional. - "{?\\(?1:[^] ,}\r\n\t%]+\\)" - ;; We are done. Just search until the next closing bracket - "[^]]*\\]")) - "List of regexps matching \\label definitions. +(defcustom reftex-label-regexps + `(;; Normal \\label{foo} labels + "\\\\label{\\(?1:[^}]*\\)}" + ;; keyvals [..., label = {foo}, ...] forms used by ctable, + ;; listings, breqn, ... + ,(concat + ;; Make sure we search only for optional arguments of + ;; environments/macros and don't match any other [. ctable + ;; provides a macro called \ctable, beamer/breqn/listings have + ;; environments. Start with a backslash and a group for names + "\\\\\\(?:" + ;; begin, optional spaces and opening brace + "begin[[:space:]]*{" + ;; Build a regexp for env names + (regexp-opt '("lstlisting" "dmath" "dseries" "dgroup" + "darray" "frame")) + ;; closing brace, optional spaces + "}[[:space:]]*" + ;; Now for macros + "\\|" + ;; Build a regexp for macro names; currently only \ctable + (regexp-opt '("ctable")) + ;; Close the group for names + "\\)" + ;; Match the opening [ and the following chars + "\\[[^][]*" + ;; Allow nested levels of chars enclosed in braces + "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" + "}[^][]*\\)*" + ;; Match the label key + "\\<label[[:space:]]*=[[:space:]]*" + ;; Match the label value; braces around the value are + ;; optional. + "{?\\(?1:[^] ,}\r\n\t%]+\\)" + ;; We are done. Just search until the next closing bracket + "[^]]*\\]")) + "List of regexps matching \\label definitions. The default value matches usual \\label{...} definitions and keyval style [..., label = {...}, ...] label definitions. The regexp for keyval style explicitly looks for environments @@ -946,13 +942,13 @@ you have to define it using \\(?1:...\\) when adding new regexps. When changed from Lisp, make sure to call `reftex-compile-variables' afterwards to make the change effective." - :version "28.1" - :set (lambda (symbol value) - (set symbol value) - (when (fboundp 'reftex-compile-variables) - (reftex-compile-variables))) - :group 'reftex-defining-label-environments - :type '(repeat (regexp :tag "Regular Expression")))) + :version "28.1" + :set (lambda (symbol value) + (set symbol value) + (when (fboundp 'reftex-compile-variables) + (reftex-compile-variables))) + :group 'reftex-defining-label-environments + :type '(repeat (regexp :tag "Regular Expression"))) (defcustom reftex-label-ignored-macros-and-environments nil "List of macros and environments to be ignored when searching for labels. diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index b731c124421..cd76bf80f19 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -176,14 +176,8 @@ ;; ;; 2003.08.12 Sacha's birthday -;;; History: - ;;; Code: -(defconst remember-version "2.0" - "This version of remember.") -(make-obsolete-variable 'remember-version nil "28.1") - (defgroup remember nil "A mode to remember information." :group 'data) @@ -673,6 +667,11 @@ is non-nil, bury it and return nil; otherwise return t." nil) t)) +;; Obsolete + +(defconst remember-version "2.0" "This version of remember.") +(make-obsolete-variable 'remember-version 'emacs-version "28.1") + (provide 'remember) ;;; remember.el ends here diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index ce156370d57..56cca840047 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -554,30 +554,30 @@ After interpretation of ARGS the results are concatenated as for `:seq'." (apply #'concat (mapcar - #'(lambda (re) - (cond - ((stringp re) - re) - ((symbolp re) - (cadr (assoc re rst-re-alist))) - ((characterp re) - (regexp-quote (char-to-string re))) - ((listp re) - (let ((nested - (mapcar #'rst-re (cdr re)))) - (cond - ((eq (car re) :seq) - (mapconcat #'identity nested "")) - ((eq (car re) :shy) - (concat "\\(?:" (mapconcat #'identity nested "") "\\)")) - ((eq (car re) :grp) - (concat "\\(" (mapconcat #'identity nested "") "\\)")) - ((eq (car re) :alt) - (concat "\\(?:" (mapconcat #'identity nested "\\|") "\\)")) - (t - (error "Unknown list car: %s" (car re)))))) - (t - (error "Unknown object type for building regex: %s" re)))) + (lambda (re) + (cond + ((stringp re) + re) + ((symbolp re) + (cadr (assoc re rst-re-alist))) + ((characterp re) + (regexp-quote (char-to-string re))) + ((listp re) + (let ((nested + (mapcar #'rst-re (cdr re)))) + (cond + ((eq (car re) :seq) + (mapconcat #'identity nested "")) + ((eq (car re) :shy) + (concat "\\(?:" (mapconcat #'identity nested "") "\\)")) + ((eq (car re) :grp) + (concat "\\(" (mapconcat #'identity nested "") "\\)")) + ((eq (car re) :alt) + (concat "\\(?:" (mapconcat #'identity nested "\\|") "\\)")) + (t + (error "Unknown list car: %s" (car re)))))) + (t + (error "Unknown object type for building regex: %s" re)))) args))) ;; FIXME: Remove circular dependency between `rst-re' and `rst-re-alist'. @@ -709,8 +709,8 @@ Return CHAR if so or signal an error otherwise." ;; testcover: ok. "Return position of SELF in ADOS or nil." (cl-check-type self rst-Ado) - (cl-position-if #'(lambda (e) - (rst-Ado-equal self e)) + (cl-position-if (lambda (e) + (rst-Ado-equal self e)) ados)) @@ -814,8 +814,8 @@ Return ADO if so or signal an error otherwise." "Return sublist of HDRS whose car's adornment equals that of SELF or nil." (cl-check-type self rst-Hdr) (let ((ado (rst-Hdr-ado self))) - (cl-member-if #'(lambda (hdr) - (rst-Ado-equal ado (rst-Hdr-ado hdr))) + (cl-member-if (lambda (hdr) + (rst-Ado-equal ado (rst-Hdr-ado hdr))) hdrs))) (defun rst-Hdr-ado-map (selves) @@ -1277,8 +1277,8 @@ This inherits from Text mode.") ;; Abbrevs. (define-abbrev-table 'rst-mode-abbrev-table - (mapcar #'(lambda (x) - (append x '(nil 0 system))) + (mapcar (lambda (x) + (append x '(nil 0 system))) '(("contents" ".. contents::\n..\n ") ("con" ".. contents::\n..\n ") ("cont" "[...]") @@ -1501,9 +1501,9 @@ file." :type `(repeat (group :tag "Adornment specification" (choice :tag "Adornment character" - ,@(mapcar #'(lambda (char) - (list 'const - :tag (char-to-string char) char)) + ,@(mapcar (lambda (char) + (list 'const + :tag (char-to-string char) char)) rst-adornment-chars)) (radio :tag "Adornment type" (const :tag "Overline and underline" over-and-under) @@ -1540,8 +1540,8 @@ search starts after this entry. Return nil if no new preferred ;; Start searching after the level of the previous adornment. (cdr (rst-Hdr-member-ado prev (rst-Hdr-preferred-adornments)))) (rst-Hdr-preferred-adornments)))) - (cl-find-if #'(lambda (cand) - (not (rst-Hdr-member-ado cand seen))) + (cl-find-if (lambda (cand) + (not (rst-Hdr-member-ado cand seen))) candidates))) (defun rst-update-section (hdr) @@ -1620,55 +1620,55 @@ returned." (ttl-blw ; Title found below starting here. (rst-forward-line-looking-at +1 'ttl-beg-1 - #'(lambda (mtcd) - (when mtcd - (setq txt-blw (match-string-no-properties 1)) - (point))))) + (lambda (mtcd) + (when mtcd + (setq txt-blw (match-string-no-properties 1)) + (point))))) txt-abv (ttl-abv ; Title found above starting here. (rst-forward-line-looking-at -1 'ttl-beg-1 - #'(lambda (mtcd) - (when mtcd - (setq txt-abv (match-string-no-properties 1)) - (point))))) + (lambda (mtcd) + (when mtcd + (setq txt-abv (match-string-no-properties 1)) + (point))))) (und-fnd ; Matching underline found starting here. (and ttl-blw (rst-forward-line-looking-at +2 (list ado-re 'lin-end) - #'(lambda (mtcd) - (when mtcd - (point)))))) + (lambda (mtcd) + (when mtcd + (point)))))) (ovr-fnd ; Matching overline found starting here. (and ttl-abv (rst-forward-line-looking-at -2 (list ado-re 'lin-end) - #'(lambda (mtcd) - (when mtcd - (point)))))) + (lambda (mtcd) + (when mtcd + (point)))))) (und-wng ; Wrong underline found starting here. (and ttl-blw (not und-fnd) (rst-forward-line-looking-at +2 'ado-beg-2-1 - #'(lambda (mtcd) - (when mtcd - (point)))))) + (lambda (mtcd) + (when mtcd + (point)))))) (ovr-wng ; Wrong overline found starting here. (and ttl-abv (not ovr-fnd) (rst-forward-line-looking-at -2 'ado-beg-2-1 - #'(lambda (mtcd) - (when (and - mtcd - ;; An adornment above may be a legal - ;; adornment for the line above - consider it - ;; a wrong overline only when it is equally - ;; long. - (equal - (length (match-string-no-properties 1)) - (length adornment))) - (point))))))) + (lambda (mtcd) + (when (and + mtcd + ;; An adornment above may be a legal + ;; adornment for the line above - consider it + ;; a wrong overline only when it is equally + ;; long. + (equal + (length (match-string-no-properties 1)) + (length adornment))) + (point))))))) (cond ((and nxt-emp prv-emp) ;; A transition. @@ -1708,11 +1708,11 @@ a section header or nil if no title line is found." (rst-forward-line-strict 0)) (let* (cnd-beg ; Beginning of a title candidate. cnd-txt ; Text of a title candidate. - (cnd-fun #'(lambda (mtcd) ; Function setting title candidate data. - (when mtcd - (setq cnd-beg (match-beginning 0)) - (setq cnd-txt (match-string-no-properties 1)) - t))) + (cnd-fun (lambda (mtcd) ; Function setting title candidate data. + (when mtcd + (setq cnd-beg (match-beginning 0)) + (setq cnd-txt (match-string-no-properties 1)) + t))) ttl) (cond ((looking-at (rst-re 'ado-beg-2-1)) @@ -1728,10 +1728,10 @@ a section header or nil if no title line is found." ;; Title line found - check for a following underline. (setq ttl (rst-forward-line-looking-at 1 'ado-beg-2-1 - #'(lambda (mtcd) - (when mtcd - (rst-classify-adornment - (match-string-no-properties 0) (match-end 0)))))) + (lambda (mtcd) + (when mtcd + (rst-classify-adornment + (match-string-no-properties 0) (match-end 0)))))) ;; Title candidate found if no valid adornment found. (funcall cnd-fun (not ttl)))) (cond @@ -1827,15 +1827,15 @@ given." (ignore-ttl (if ignore-position (cl-find-if - #'(lambda (ttl) - (equal (rst-Ttl-contains ttl ignore-position) 0)) + (lambda (ttl) + (equal (rst-Ttl-contains ttl ignore-position) 0)) all-ttls))) (really-ignore (if ignore-ttl (<= (cl-count-if - #'(lambda (ttl) - (rst-Ado-equal (rst-Ttl-ado ignore-ttl) - (rst-Ttl-ado ttl))) + (lambda (ttl) + (rst-Ado-equal (rst-Ttl-ado ignore-ttl) + (rst-Ttl-ado ttl))) all-ttls) 1))) (real-ttls (delq (if really-ignore ignore-ttl) all-ttls))) @@ -1859,14 +1859,14 @@ given." Return a list of (`rst-Ttl' . LEVEL) with ascending line number." (let ((hier (rst-Hdr-ado-map (rst-hdr-hierarchy)))) (mapcar - #'(lambda (ttl) - (cons ttl (rst-Ado-position (rst-Ttl-ado ttl) hier))) + (lambda (ttl) + (cons ttl (rst-Ado-position (rst-Ttl-ado ttl) hier))) (rst-all-ttls)))) (defun rst-get-previous-hdr () "Return the `rst-Hdr' before point or nil if none." - (let ((prev (cl-find-if #'(lambda (ttl) - (< (rst-Ttl-contains ttl (point)) 0)) + (let ((prev (cl-find-if (lambda (ttl) + (< (rst-Ttl-contains ttl (point)) 0)) (rst-all-ttls) :from-end t))) (and prev (rst-Ttl-hdr prev)))) @@ -2169,19 +2169,19 @@ hierarchy is similar to that used by `rst-adjust-section'." (let* ((beg (region-beginning)) (end (region-end)) (ttls-reg (cl-remove-if-not - #'(lambda (ttl) - (and - (>= (rst-Ttl-contains ttl beg) 0) - (< (rst-Ttl-contains ttl end) 0))) + (lambda (ttl) + (and + (>= (rst-Ttl-contains ttl beg) 0) + (< (rst-Ttl-contains ttl end) 0))) (rst-all-ttls)))) (save-excursion ;; Apply modifications. (rst-destructuring-dolist ((marker &rest hdr &aux (hier (rst-hdr-hierarchy))) - (mapcar #'(lambda (ttl) - (cons (copy-marker (rst-Ttl-get-title-beginning ttl)) - (rst-Ttl-hdr ttl))) + (mapcar (lambda (ttl) + (cons (copy-marker (rst-Ttl-get-title-beginning ttl)) + (rst-Ttl-hdr ttl))) ttls-reg)) (set-marker (goto-char marker) nil) @@ -2391,9 +2391,9 @@ also arranged by `rst-insert-list-new-tag'." "List of favorite bullets." :group 'rst :type `(repeat - (choice ,@(mapcar #'(lambda (char) - (list 'const - :tag (char-to-string char) char)) + (choice ,@(mapcar (lambda (char) + (list 'const + :tag (char-to-string char) char)) rst-bullets))) :package-version '(rst . "1.1.0")) @@ -2517,13 +2517,13 @@ ordered by POINT." (looking-at (rst-re rst-re-beg)) ; Start found (not (rst-forward-line-looking-at -1 'lin-end - #'(lambda (mtcd) ; Previous line exists and is... - (and - (not mtcd) ; non-empty, - (<= (current-indentation) clm) ; less indented - (not (and (= (current-indentation) clm) + (lambda (mtcd) ; Previous line exists and is... + (and + (not mtcd) ; non-empty, + (<= (current-indentation) clm) ; less indented + (not (and (= (current-indentation) clm) ; not a beg at same level. - (looking-at (rst-re rst-re-beg))))))))) + (looking-at (rst-re rst-re-beg))))))))) (back-to-indentation) (push (cons (point) clm) r))) (1value ; At least one line is moved in this loop. @@ -2553,8 +2553,8 @@ modified." ((bullet _clm &rest pnts) ;; Zip preferred bullets and sorted columns associating a bullet ;; with a column and all the points this column is found. - (cl-mapcar #'(lambda (bullet clm2pnt) - (cons bullet clm2pnt)) + (cl-mapcar (lambda (bullet clm2pnt) + (cons bullet clm2pnt)) rst-preferred-bullets (sort clm2pnts #'car-less-than-car))) ;; Replace the bullets by the preferred ones. @@ -2614,8 +2614,8 @@ section headers at all." (when (>= point (rst-Stn-get-title-beginning stn)) ;; Point may be in this section or a child. (let ((in-child (cl-find-if - #'(lambda (child) - (>= point (rst-Stn-get-title-beginning child))) + (lambda (child) + (>= point (rst-Stn-get-title-beginning child))) (rst-Stn-children stn) :from-end t))) (if in-child @@ -2829,18 +2829,18 @@ file-write hook to always make it up-to-date automatically." (and beg (rst-forward-line-looking-at 1 'lin-end - #'(lambda (mtcd) - (unless mtcd - (rst-apply-indented-blocks - (point) (point-max) (current-indentation) - #'(lambda (count _in-first _in-sub in-super in-empty - _relind) - (cond - ((or (> count 1) in-super)) - ((not in-empty) - (setq fnd (line-end-position)) - nil))))) - t))) + (lambda (mtcd) + (unless mtcd + (rst-apply-indented-blocks + (point) (point-max) (current-indentation) + (lambda (count _in-first _in-sub in-super in-empty + _relind) + (cond + ((or (> count 1) in-super)) + ((not in-empty) + (setq fnd (line-end-position)) + nil))))) + t))) (when fnd (delete-region beg fnd)) (goto-char beg) @@ -3024,14 +3024,14 @@ direction." (contained nil) ; Title contains point (or is after point otherwise). (found (or (cl-position-if ;; Find a title containing or after point. - #'(lambda (ttl) - (let ((cmp (rst-Ttl-contains ttl pnt))) - (cond - ((= cmp 0) ; Title contains point. - (setq contained t) - t) - ((> cmp 0) ; Title after point. - t)))) + (lambda (ttl) + (let ((cmp (rst-Ttl-contains ttl pnt))) + (cond + ((= cmp 0) ; Title contains point. + (setq contained t) + t) + ((> cmp 0) ; Title after point. + t)))) ttls) ;; Point after all titles. count)) @@ -3290,8 +3290,8 @@ remove all indentation (CNT = 0). A tab is taken from the text above. If no suitable tab is found `rst-indent-width' is used." (interactive "r\np") (let ((tabs (sort (rst-compute-tabs beg) - #'(lambda (x y) - (<= x y)))) + (lambda (x y) + (<= x y)))) (leftmostcol (rst-find-leftmost-column beg end))) (when (or (> leftmostcol 0) (> cnt 0)) ;; Apply the indent. @@ -3306,8 +3306,8 @@ above. If no suitable tab is found `rst-indent-width' is used." (dir (cl-signum cnt)) ; Direction to take. (abs (abs cnt)) ; Absolute number of steps to take. ;; Get the position of the first tab beyond leftmostcol. - (fnd (cl-position-if #'(lambda (elt) - (funcall cmp elt leftmostcol)) + (fnd (cl-position-if (lambda (elt) + (funcall cmp elt leftmostcol)) tabs)) ;; Virtual position of tab. (pos (+ (or fnd len) (1- abs))) @@ -3492,20 +3492,20 @@ do all lines instead of just paragraphs." (indent "")) (rst-apply-indented-blocks beg end (rst-find-leftmost-column beg end) - #'(lambda (count in-first in-sub in-super in-empty _relind) - (cond - (in-empty) - (in-super) - ((zerop count)) - (in-sub - (insert indent)) - ((or in-first all) - (let ((tag (format "%d. " (cl-incf enum)))) - (setq indent (make-string (length tag) ? )) - (insert tag))) - (t - (insert indent))) - nil)))) + (lambda (count in-first in-sub in-super in-empty _relind) + (cond + (in-empty) + (in-super) + ((zerop count)) + (in-sub + (insert indent)) + ((or in-first all) + (let ((tag (format "%d. " (cl-incf enum)))) + (setq indent (make-string (length tag) ? )) + (insert tag))) + (t + (insert indent))) + nil)))) ;; FIXME: Does not deal with deeper indentation - although ;; `rst-apply-indented-blocks' could. @@ -3520,18 +3520,18 @@ do all lines instead of just paragraphs." (indent (make-string (length bul) ? ))) (rst-apply-indented-blocks beg end (rst-find-leftmost-column beg end) - #'(lambda (count in-first in-sub in-super in-empty _relind) - (cond - (in-empty) - (in-super) - ((zerop count)) - (in-sub - (insert indent)) - ((or in-first all) - (insert bul)) - (t - (insert indent))) - nil)))) + (lambda (count in-first in-sub in-super in-empty _relind) + (cond + (in-empty) + (in-super) + ((zerop count)) + (in-sub + (insert indent)) + ((or in-first all) + (insert bul)) + (t + (insert indent))) + nil)))) ;; FIXME: Does not deal with a varying number of digits appropriately. ;; FIXME: Does not deal with multiple levels independently. @@ -3561,11 +3561,11 @@ Region is from BEG to END. With WITH-EMPTY prefix empty lines too." (let ((ind (rst-find-leftmost-column beg end))) (rst-apply-indented-blocks beg end ind - #'(lambda (_count _in-first _in-sub in-super in-empty _relind) - (when (and (not in-super) (or with-empty (not in-empty))) - (move-to-column ind t) - (insert "| ")) - nil)))) + (lambda (_count _in-first _in-sub in-super in-empty _relind) + (when (and (not in-super) (or with-empty (not in-empty))) + (move-to-column ind t) + (insert "| ")) + nil)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -4085,16 +4085,16 @@ end of the buffer) return nil and do not move point." (setq fnd (rst-apply-indented-blocks (line-beginning-position 2) ; Skip the current line (or limit (point-max)) (or column (current-column)) - #'(lambda (_count _in-first _in-sub in-super in-empty _relind) - (cond - (in-empty - (setq candidate (or candidate (line-beginning-position))) - nil) - (in-super - (or candidate (line-beginning-position))) - (t ; Non-empty, same or more indented line. - (setq candidate nil) - nil))))) + (lambda (_count _in-first _in-sub in-super in-empty _relind) + (cond + (in-empty + (setq candidate (or candidate (line-beginning-position))) + nil) + (in-super + (or candidate (line-beginning-position))) + (t ; Non-empty, same or more indented line. + (setq candidate nil) + nil))))) (when fnd (goto-char fnd)))) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 7de5317b025..6958ab8f658 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -2368,7 +2368,7 @@ or Edit/Text Properties/Face commands. Pages can have <a name=\"SOMENAME\">named points</a> and can link other points to them with <a href=\"#SOMENAME\">see also somename</a>. In the same way <a href=\"URL\">see also URL</a> where URL is a filename relative to current -directory, or absolute as in `http://www.cs.indiana.edu/elisp/w3/docs.html'. +directory, or absolute as in `https://www.cs.indiana.edu/elisp/w3/docs.html'. Images in many formats can be inlined with <img src=\"URL\">. diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index a9f066c4da4..13b4a6d05b0 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -2911,11 +2911,11 @@ HTML: URL `https://www.w3.org' LaTeX: - URL `http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html' + URL `https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html' CALS (DocBook DTD): - URL `http://www.oasis-open.org/html/a502.htm' - URL `http://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751' + URL `https://www.oasis-open.org/html/a502.htm' + URL `https://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751' " (interactive (let* ((_ (unless (table--probe-cell) (error "Table not found here"))) |