diff options
Diffstat (limited to 'lisp')
102 files changed, 901 insertions, 795 deletions
diff --git a/lisp/array.el b/lisp/array.el index 08c5ff45ddd..aed93ffb65b 100644 --- a/lisp/array.el +++ b/lisp/array.el | |||
| @@ -103,7 +103,7 @@ Set them to the optional arguments A-ROW and A-COLUMN if those are supplied." | |||
| 103 | 103 | ||
| 104 | (defun array-update-buffer-position () | 104 | (defun array-update-buffer-position () |
| 105 | "Set `array-buffer-line' and `array-buffer-column' to their current values." | 105 | "Set `array-buffer-line' and `array-buffer-column' to their current values." |
| 106 | (setq array-buffer-line (current-line) | 106 | (setq array-buffer-line (array-current-line) |
| 107 | array-buffer-column (current-column))) | 107 | array-buffer-column (current-column))) |
| 108 | 108 | ||
| 109 | 109 | ||
| @@ -113,7 +113,7 @@ Set them to the optional arguments A-ROW and A-COLUMN if those are supplied." | |||
| 113 | (defun array-what-position () | 113 | (defun array-what-position () |
| 114 | "Display the row and column in which the cursor is positioned." | 114 | "Display the row and column in which the cursor is positioned." |
| 115 | (interactive) | 115 | (interactive) |
| 116 | (let ((array-buffer-line (current-line)) | 116 | (let ((array-buffer-line (array-current-line)) |
| 117 | (array-buffer-column (current-column))) | 117 | (array-buffer-column (current-column))) |
| 118 | (message "Array row: %s Array column: %s" | 118 | (message "Array row: %s Array column: %s" |
| 119 | (prin1-to-string (array-current-row)) | 119 | (prin1-to-string (array-current-row)) |
| @@ -147,13 +147,13 @@ Set them to the optional arguments A-ROW and A-COLUMN if those are supplied." | |||
| 147 | ;;; Internal movement functions. | 147 | ;;; Internal movement functions. |
| 148 | 148 | ||
| 149 | (defun array-beginning-of-field (&optional go-there) | 149 | (defun array-beginning-of-field (&optional go-there) |
| 150 | "Return the column of the beginning of the current field. | 150 | "Return the column of the beginning of the current field. |
| 151 | Optional argument GO-THERE, if non-nil, means go there too." | 151 | Optional argument GO-THERE, if non-nil, means go there too." |
| 152 | ;; Requires that array-buffer-column be current. | 152 | ;; Requires that array-buffer-column be current. |
| 153 | (let ((goal-column (- array-buffer-column (% array-buffer-column array-field-width)))) | 153 | (let ((goal-column (- array-buffer-column (% array-buffer-column array-field-width)))) |
| 154 | (if go-there | 154 | (if go-there |
| 155 | (move-to-column-untabify goal-column) | 155 | (array-move-to-column-untabify goal-column) |
| 156 | goal-column))) | 156 | goal-column))) |
| 157 | 157 | ||
| 158 | (defun array-end-of-field (&optional go-there) | 158 | (defun array-end-of-field (&optional go-there) |
| 159 | "Return the column of the end of the current array field. | 159 | "Return the column of the end of the current array field. |
| @@ -162,7 +162,7 @@ If optional argument GO-THERE is non-nil, go there too." | |||
| 162 | (let ((goal-column (+ (- array-buffer-column (% array-buffer-column array-field-width)) | 162 | (let ((goal-column (+ (- array-buffer-column (% array-buffer-column array-field-width)) |
| 163 | array-field-width))) | 163 | array-field-width))) |
| 164 | (if go-there | 164 | (if go-there |
| 165 | (move-to-column-untabify goal-column) | 165 | (array-move-to-column-untabify goal-column) |
| 166 | goal-column))) | 166 | goal-column))) |
| 167 | 167 | ||
| 168 | (defun array-move-to-cell (a-row a-column) | 168 | (defun array-move-to-cell (a-row a-column) |
| @@ -174,7 +174,7 @@ Leave point at the beginning of the field and return the new buffer column." | |||
| 174 | (goal-column (* array-field-width (% (1- a-column) array-columns-per-line)))) | 174 | (goal-column (* array-field-width (% (1- a-column) array-columns-per-line)))) |
| 175 | (goto-char (point-min)) | 175 | (goto-char (point-min)) |
| 176 | (forward-line goal-line) | 176 | (forward-line goal-line) |
| 177 | (move-to-column-untabify goal-column))) | 177 | (array-move-to-column-untabify goal-column))) |
| 178 | 178 | ||
| 179 | (defun array-move-to-row (a-row) | 179 | (defun array-move-to-row (a-row) |
| 180 | "Move to array row A-ROW preserving the current array column. | 180 | "Move to array row A-ROW preserving the current array column. |
| @@ -184,7 +184,7 @@ Leave point at the beginning of the field and return the new array row." | |||
| 184 | (% array-buffer-line array-lines-per-row))) | 184 | (% array-buffer-line array-lines-per-row))) |
| 185 | (goal-column (- array-buffer-column (% array-buffer-column array-field-width)))) | 185 | (goal-column (- array-buffer-column (% array-buffer-column array-field-width)))) |
| 186 | (forward-line (- goal-line array-buffer-line)) | 186 | (forward-line (- goal-line array-buffer-line)) |
| 187 | (move-to-column-untabify goal-column) | 187 | (array-move-to-column-untabify goal-column) |
| 188 | a-row)) | 188 | a-row)) |
| 189 | 189 | ||
| 190 | (defun array-move-to-column (a-column) | 190 | (defun array-move-to-column (a-column) |
| @@ -196,7 +196,7 @@ Leave point at the beginning of the field and return the new array column." | |||
| 196 | (floor (1- a-column) array-columns-per-line))) | 196 | (floor (1- a-column) array-columns-per-line))) |
| 197 | (goal-column (* array-field-width (% (1- a-column) array-columns-per-line)))) | 197 | (goal-column (* array-field-width (% (1- a-column) array-columns-per-line)))) |
| 198 | (forward-line (- goal-line array-buffer-line)) | 198 | (forward-line (- goal-line array-buffer-line)) |
| 199 | (move-to-column-untabify goal-column) | 199 | (array-move-to-column-untabify goal-column) |
| 200 | a-column)) | 200 | a-column)) |
| 201 | 201 | ||
| 202 | (defun array-move-one-row (sign) | 202 | (defun array-move-one-row (sign) |
| @@ -214,7 +214,7 @@ If requested to move beyond the array bounds, signal an error." | |||
| 214 | (t | 214 | (t |
| 215 | (progn | 215 | (progn |
| 216 | (forward-line (* sign array-lines-per-row)) | 216 | (forward-line (* sign array-lines-per-row)) |
| 217 | (move-to-column-untabify goal-column) | 217 | (array-move-to-column-untabify goal-column) |
| 218 | (+ array-row sign)))))) | 218 | (+ array-row sign)))))) |
| 219 | 219 | ||
| 220 | (defun array-move-one-column (sign) | 220 | (defun array-move-one-column (sign) |
| @@ -233,15 +233,15 @@ If requested to move beyond the array bounds, signal an error." | |||
| 233 | ;; Going backward from first column on the line. | 233 | ;; Going backward from first column on the line. |
| 234 | ((and (= sign -1) (= 1 (% array-column array-columns-per-line))) | 234 | ((and (= sign -1) (= 1 (% array-column array-columns-per-line))) |
| 235 | (forward-line -1) | 235 | (forward-line -1) |
| 236 | (move-to-column-untabify | 236 | (array-move-to-column-untabify |
| 237 | (* array-field-width (1- array-columns-per-line)))) | 237 | (* array-field-width (1- array-columns-per-line)))) |
| 238 | ;; Going forward from last column on the line. | 238 | ;; Going forward from last column on the line. |
| 239 | ((and (= sign 1) (zerop (% array-column array-columns-per-line))) | 239 | ((and (= sign 1) (zerop (% array-column array-columns-per-line))) |
| 240 | (forward-line 1)) | 240 | (forward-line 1)) |
| 241 | ;; Somewhere in the middle of the line. | 241 | ;; Somewhere in the middle of the line. |
| 242 | (t | 242 | (t |
| 243 | (move-to-column-untabify (+ (array-beginning-of-field) | 243 | (array-move-to-column-untabify (+ (array-beginning-of-field) |
| 244 | (* array-field-width sign))))) | 244 | (* array-field-width sign))))) |
| 245 | (+ array-column sign))))) | 245 | (+ array-column sign))))) |
| 246 | 246 | ||
| 247 | (defun array-normalize-cursor () | 247 | (defun array-normalize-cursor () |
| @@ -281,15 +281,15 @@ If necessary, scroll horizontally to keep the cursor in view." | |||
| 281 | "Move down one array row, staying in the current array column. | 281 | "Move down one array row, staying in the current array column. |
| 282 | If optional ARG is given, move down ARG array rows." | 282 | If optional ARG is given, move down ARG array rows." |
| 283 | (interactive "p") | 283 | (interactive "p") |
| 284 | (let ((array-buffer-line (current-line)) | 284 | (let ((array-buffer-line (array-current-line)) |
| 285 | (array-buffer-column (current-column))) | 285 | (array-buffer-column (current-column))) |
| 286 | (if (= (abs arg) 1) | 286 | (if (= (abs arg) 1) |
| 287 | (array-move-one-row arg) | 287 | (array-move-one-row arg) |
| 288 | (array-move-to-row | 288 | (array-move-to-row |
| 289 | (limit-index (+ (or (array-current-row) | 289 | (array--limit-index (+ (or (array-current-row) |
| 290 | (error "Cursor is not in an array cell")) | 290 | (error "Cursor is not in an array cell")) |
| 291 | arg) | 291 | arg) |
| 292 | array-max-row)))) | 292 | array-max-row)))) |
| 293 | (array-normalize-cursor)) | 293 | (array-normalize-cursor)) |
| 294 | 294 | ||
| 295 | (defun array-previous-row (&optional arg) | 295 | (defun array-previous-row (&optional arg) |
| @@ -303,15 +303,15 @@ If optional ARG is given, move up ARG array rows." | |||
| 303 | If optional ARG is given, move forward ARG array columns. | 303 | If optional ARG is given, move forward ARG array columns. |
| 304 | If necessary, keep the cursor in the window by scrolling right or left." | 304 | If necessary, keep the cursor in the window by scrolling right or left." |
| 305 | (interactive "p") | 305 | (interactive "p") |
| 306 | (let ((array-buffer-line (current-line)) | 306 | (let ((array-buffer-line (array-current-line)) |
| 307 | (array-buffer-column (current-column))) | 307 | (array-buffer-column (current-column))) |
| 308 | (if (= (abs arg) 1) | 308 | (if (= (abs arg) 1) |
| 309 | (array-move-one-column arg) | 309 | (array-move-one-column arg) |
| 310 | (array-move-to-column | 310 | (array-move-to-column |
| 311 | (limit-index (+ (or (array-current-column) | 311 | (array--limit-index (+ (or (array-current-column) |
| 312 | (error "Cursor is not in an array cell")) | 312 | (error "Cursor is not in an array cell")) |
| 313 | arg) | 313 | arg) |
| 314 | array-max-column)))) | 314 | array-max-column)))) |
| 315 | (array-normalize-cursor)) | 315 | (array-normalize-cursor)) |
| 316 | 316 | ||
| 317 | (defun array-backward-column (&optional arg) | 317 | (defun array-backward-column (&optional arg) |
| @@ -325,8 +325,8 @@ If necessary, keep the cursor in the window by scrolling right or left." | |||
| 325 | "Go to array row A-ROW and array column A-COLUMN." | 325 | "Go to array row A-ROW and array column A-COLUMN." |
| 326 | (interactive "nArray row: \nnArray column: ") | 326 | (interactive "nArray row: \nnArray column: ") |
| 327 | (array-move-to-cell | 327 | (array-move-to-cell |
| 328 | (limit-index a-row array-max-row) | 328 | (array--limit-index a-row array-max-row) |
| 329 | (limit-index a-column array-max-column)) | 329 | (array--limit-index a-column array-max-column)) |
| 330 | (array-normalize-cursor)) | 330 | (array-normalize-cursor)) |
| 331 | 331 | ||
| 332 | 332 | ||
| @@ -417,7 +417,7 @@ Leave point at the beginning of the field." | |||
| 417 | "Copy the current field one array row down. | 417 | "Copy the current field one array row down. |
| 418 | If optional ARG is given, copy down through ARG array rows." | 418 | If optional ARG is given, copy down through ARG array rows." |
| 419 | (interactive "p") | 419 | (interactive "p") |
| 420 | (let* ((array-buffer-line (current-line)) | 420 | (let* ((array-buffer-line (array-current-line)) |
| 421 | (array-buffer-column (current-column)) | 421 | (array-buffer-column (current-column)) |
| 422 | (array-row (or (array-current-row) | 422 | (array-row (or (array-current-row) |
| 423 | (error "Cursor is not in a valid array cell"))) | 423 | (error "Cursor is not in a valid array cell"))) |
| @@ -425,7 +425,7 @@ If optional ARG is given, copy down through ARG array rows." | |||
| 425 | (if (= (abs arg) 1) | 425 | (if (= (abs arg) 1) |
| 426 | (array-copy-once-vertically arg) | 426 | (array-copy-once-vertically arg) |
| 427 | (array-copy-to-row | 427 | (array-copy-to-row |
| 428 | (limit-index (+ array-row arg) array-max-row)))) | 428 | (array--limit-index (+ array-row arg) array-max-row)))) |
| 429 | (array-normalize-cursor)) | 429 | (array-normalize-cursor)) |
| 430 | 430 | ||
| 431 | (defun array-copy-up (&optional arg) | 431 | (defun array-copy-up (&optional arg) |
| @@ -438,7 +438,7 @@ If optional ARG is given, copy up through ARG array rows." | |||
| 438 | "Copy the current field one array column to the right. | 438 | "Copy the current field one array column to the right. |
| 439 | If optional ARG is given, copy through ARG array columns to the right." | 439 | If optional ARG is given, copy through ARG array columns to the right." |
| 440 | (interactive "p") | 440 | (interactive "p") |
| 441 | (let* ((array-buffer-line (current-line)) | 441 | (let* ((array-buffer-line (array-current-line)) |
| 442 | (array-buffer-column (current-column)) | 442 | (array-buffer-column (current-column)) |
| 443 | (array-column (or (array-current-column) | 443 | (array-column (or (array-current-column) |
| 444 | (error "Cursor is not in a valid array cell"))) | 444 | (error "Cursor is not in a valid array cell"))) |
| @@ -446,7 +446,7 @@ If optional ARG is given, copy through ARG array columns to the right." | |||
| 446 | (if (= (abs arg) 1) | 446 | (if (= (abs arg) 1) |
| 447 | (array-copy-once-horizontally arg) | 447 | (array-copy-once-horizontally arg) |
| 448 | (array-copy-to-column | 448 | (array-copy-to-column |
| 449 | (limit-index (+ array-column arg) array-max-column)))) | 449 | (array--limit-index (+ array-column arg) array-max-column)))) |
| 450 | (array-normalize-cursor)) | 450 | (array-normalize-cursor)) |
| 451 | 451 | ||
| 452 | (defun array-copy-backward (&optional arg) | 452 | (defun array-copy-backward (&optional arg) |
| @@ -473,7 +473,7 @@ If optional ARG is given, copy through ARG array columns to the right." | |||
| 473 | (if (= (abs arg) 1) | 473 | (if (= (abs arg) 1) |
| 474 | (array-copy-once-horizontally arg) | 474 | (array-copy-once-horizontally arg) |
| 475 | (array-copy-to-column | 475 | (array-copy-to-column |
| 476 | (limit-index (+ array-column arg) array-max-column)))))) | 476 | (array--limit-index (+ array-column arg) array-max-column)))))) |
| 477 | (message "Working...done") | 477 | (message "Working...done") |
| 478 | (array-move-to-row array-row) | 478 | (array-move-to-row array-row) |
| 479 | (array-normalize-cursor)) | 479 | (array-normalize-cursor)) |
| @@ -506,7 +506,7 @@ If optional ARG is given, copy through ARG rows down." | |||
| 506 | (forward-line 1) | 506 | (forward-line 1) |
| 507 | (point)))) | 507 | (point)))) |
| 508 | (this-row array-row) | 508 | (this-row array-row) |
| 509 | (goal-row (limit-index (+ this-row arg) array-max-row)) | 509 | (goal-row (array--limit-index (+ this-row arg) array-max-row)) |
| 510 | (num (- goal-row this-row)) | 510 | (num (- goal-row this-row)) |
| 511 | (count (abs num)) | 511 | (count (abs num)) |
| 512 | (sign (if (not (zerop count)) (/ num count)))) | 512 | (sign (if (not (zerop count)) (/ num count)))) |
| @@ -700,13 +700,13 @@ of `array-rows-numbered'." | |||
| 700 | (floor (1- temp-max-column) new-columns-per-line)) | 700 | (floor (1- temp-max-column) new-columns-per-line)) |
| 701 | (newlines-added 0)) | 701 | (newlines-added 0)) |
| 702 | (while (< newlines-removed newlines-to-be-removed) | 702 | (while (< newlines-removed newlines-to-be-removed) |
| 703 | (move-to-column-untabify | 703 | (array-move-to-column-untabify |
| 704 | (* (1+ newlines-removed) old-line-length)) | 704 | (* (1+ newlines-removed) old-line-length)) |
| 705 | (kill-line 1) | 705 | (kill-line 1) |
| 706 | (setq newlines-removed (1+ newlines-removed))) | 706 | (setq newlines-removed (1+ newlines-removed))) |
| 707 | (beginning-of-line) | 707 | (beginning-of-line) |
| 708 | (while (< newlines-added newlines-to-be-added) | 708 | (while (< newlines-added newlines-to-be-added) |
| 709 | (move-to-column-untabify (* old-field-width new-columns-per-line)) | 709 | (array-move-to-column-untabify (* old-field-width new-columns-per-line)) |
| 710 | (newline) | 710 | (newline) |
| 711 | (setq newlines-added (1+ newlines-added))) | 711 | (setq newlines-added (1+ newlines-added))) |
| 712 | (forward-line 1)))) | 712 | (forward-line 1)))) |
| @@ -735,16 +735,16 @@ of `array-rows-numbered'." | |||
| 735 | 735 | ||
| 736 | ;;; Utilities. | 736 | ;;; Utilities. |
| 737 | 737 | ||
| 738 | (defun limit-index (index limit) | 738 | (defun array--limit-index (index limit) |
| 739 | (cond ((< index 1) 1) | 739 | (cond ((< index 1) 1) |
| 740 | ((> index limit) limit) | 740 | ((> index limit) limit) |
| 741 | (t index))) | 741 | (t index))) |
| 742 | 742 | ||
| 743 | (defun current-line () | 743 | (defun array-current-line () |
| 744 | "Return the current buffer line at point. The first line is 0." | 744 | "Return the current buffer line at point. The first line is 0." |
| 745 | (count-lines (point-min) (line-beginning-position))) | 745 | (count-lines (point-min) (line-beginning-position))) |
| 746 | 746 | ||
| 747 | (defun move-to-column-untabify (column) | 747 | (defun array-move-to-column-untabify (column) |
| 748 | "Move to COLUMN on the current line, untabifying if necessary. | 748 | "Move to COLUMN on the current line, untabifying if necessary. |
| 749 | Return COLUMN." | 749 | Return COLUMN." |
| 750 | (or (and (= column (move-to-column column)) | 750 | (or (and (= column (move-to-column column)) |
| @@ -753,10 +753,10 @@ Return COLUMN." | |||
| 753 | (if array-respect-tabs | 753 | (if array-respect-tabs |
| 754 | (error "There is a TAB character in the way") | 754 | (error "There is a TAB character in the way") |
| 755 | (progn | 755 | (progn |
| 756 | (untabify-backward) | 756 | (array--untabify-backward) |
| 757 | (move-to-column column))))) | 757 | (move-to-column column))))) |
| 758 | 758 | ||
| 759 | (defun untabify-backward () | 759 | (defun array--untabify-backward () |
| 760 | "Untabify the preceding TAB." | 760 | "Untabify the preceding TAB." |
| 761 | (save-excursion | 761 | (save-excursion |
| 762 | (let ((start (point))) | 762 | (let ((start (point))) |
| @@ -885,7 +885,10 @@ Entering array mode calls the function `array-mode-hook'." | |||
| 885 | (setq-local truncate-lines t) | 885 | (setq-local truncate-lines t) |
| 886 | (setq overwrite-mode 'overwrite-mode-textual)) | 886 | (setq overwrite-mode 'overwrite-mode-textual)) |
| 887 | 887 | ||
| 888 | 888 | (define-obsolete-function-alias 'limit-index #'array--limit-index "29.1") | |
| 889 | (define-obsolete-function-alias 'current-line #'array-current-line "29.1") | ||
| 890 | (define-obsolete-function-alias 'move-to-column-untabify #'array-move-to-column-untabify "29.1") | ||
| 891 | (define-obsolete-function-alias 'untabify-backward #'array--untabify-backward "29.1") | ||
| 889 | 892 | ||
| 890 | (provide 'array) | 893 | (provide 'array) |
| 891 | 894 | ||
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 30a03e0431e..d0893e932b4 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -966,7 +966,7 @@ it removes only the first instance of a bookmark with that name from | |||
| 966 | the list of bookmarks.)" | 966 | the list of bookmarks.)" |
| 967 | (interactive (list nil current-prefix-arg)) | 967 | (interactive (list nil current-prefix-arg)) |
| 968 | (let ((prompt | 968 | (let ((prompt |
| 969 | (if no-overwrite "Append bookmark named" "Set bookmark named"))) | 969 | (if no-overwrite "Add bookmark named" "Set bookmark named"))) |
| 970 | (bookmark-set-internal prompt name (if no-overwrite 'push 'overwrite)))) | 970 | (bookmark-set-internal prompt name (if no-overwrite 'push 'overwrite)))) |
| 971 | 971 | ||
| 972 | ;;;###autoload | 972 | ;;;###autoload |
diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el index 3b8629b797d..8d99f62a9ba 100644 --- a/lisp/calc/calc-vec.el +++ b/lisp/calc/calc-vec.el | |||
| @@ -647,9 +647,7 @@ | |||
| 647 | (defun calcFunc-rhead (vec) | 647 | (defun calcFunc-rhead (vec) |
| 648 | (if (and (Math-vectorp vec) | 648 | (if (and (Math-vectorp vec) |
| 649 | (cdr vec)) | 649 | (cdr vec)) |
| 650 | (let ((vec (copy-sequence vec))) | 650 | (butlast vec) |
| 651 | (setcdr (nthcdr (- (length vec) 2) vec) nil) | ||
| 652 | vec) | ||
| 653 | (calc-record-why 'vectorp vec) | 651 | (calc-record-why 'vectorp vec) |
| 654 | (list 'calcFunc-rhead vec))) | 652 | (list 'calcFunc-rhead vec))) |
| 655 | 653 | ||
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 254c703ee22..6c21430b1b3 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -1959,12 +1959,8 @@ See calc-keypad for details." | |||
| 1959 | (or n (setq n 1)) | 1959 | (or n (setq n 1)) |
| 1960 | (or m (setq m 1)) | 1960 | (or m (setq m 1)) |
| 1961 | (calc-check-stack (+ n m -1)) | 1961 | (calc-check-stack (+ n m -1)) |
| 1962 | (and (> n 0) | 1962 | (nreverse (mapcar (lambda (x) (calc-get-stack-element x sel-mode)) |
| 1963 | (let ((top (copy-sequence (nthcdr (+ m calc-stack-top -1) | 1963 | (take n (nthcdr (+ m calc-stack-top -1) calc-stack))))) |
| 1964 | calc-stack)))) | ||
| 1965 | (setcdr (nthcdr (1- n) top) nil) | ||
| 1966 | (nreverse | ||
| 1967 | (mapcar (lambda (x) (calc-get-stack-element x sel-mode)) top))))) | ||
| 1968 | 1964 | ||
| 1969 | (defun calc-top-list-n (&optional n m sel-mode) | 1965 | (defun calc-top-list-n (&optional n m sel-mode) |
| 1970 | (mapcar #'math-check-complete | 1966 | (mapcar #'math-check-complete |
| @@ -2291,9 +2287,7 @@ the United States." | |||
| 2291 | ((and (null n) | 2287 | ((and (null n) |
| 2292 | (eq (car-safe top) 'incomplete) | 2288 | (eq (car-safe top) 'incomplete) |
| 2293 | (> (length top) (if (eq (nth 1 top) 'intv) 3 2))) | 2289 | (> (length top) (if (eq (nth 1 top) 'intv) 3 2))) |
| 2294 | (calc-pop-push-list 1 (let ((tt (copy-sequence top))) | 2290 | (calc-pop-push-list 1 (list (butlast top)))) |
| 2295 | (setcdr (nthcdr (- (length tt) 2) tt) nil) | ||
| 2296 | (list tt)))) | ||
| 2297 | ((< nn 0) | 2291 | ((< nn 0) |
| 2298 | (if (and calc-any-selections | 2292 | (if (and calc-any-selections |
| 2299 | (calc-top-selected 1 (- nn))) | 2293 | (calc-top-selected 1 (- nn))) |
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 7e911d814dc..bbdcaa4db4e 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el | |||
| @@ -171,13 +171,13 @@ If DATE lacks timezone information, GMT is assumed." | |||
| 171 | (error "Invalid date: %s" date))))))))) | 171 | (error "Invalid date: %s" date))))))))) |
| 172 | 172 | ||
| 173 | ;;;###autoload | 173 | ;;;###autoload |
| 174 | (defalias 'time-to-seconds 'float-time) | 174 | (defalias 'time-to-seconds #'float-time) |
| 175 | 175 | ||
| 176 | ;;;###autoload | 176 | ;;;###autoload |
| 177 | (defun seconds-to-time (seconds &rest form) | 177 | (defun seconds-to-time (seconds) |
| 178 | "Convert SECONDS to a proper time, like `current-time' would. | 178 | "Convert SECONDS to a proper time, like `current-time' would." |
| 179 | FORM means the same as in `time-convert'." | 179 | ;; FIXME: Should we (declare (obsolete time-convert "27.1")) ? |
| 180 | (time-convert seconds form)) | 180 | (time-convert seconds 'list)) |
| 181 | 181 | ||
| 182 | ;;;###autoload | 182 | ;;;###autoload |
| 183 | (defun days-to-time (days) | 183 | (defun days-to-time (days) |
| @@ -202,7 +202,7 @@ TIME should be either a time value or a date-time string." | |||
| 202 | (time-subtract nil time)) | 202 | (time-subtract nil time)) |
| 203 | 203 | ||
| 204 | ;;;###autoload | 204 | ;;;###autoload |
| 205 | (define-obsolete-function-alias 'subtract-time 'time-subtract "26.1") | 205 | (define-obsolete-function-alias 'subtract-time #'time-subtract "26.1") |
| 206 | 206 | ||
| 207 | ;;;###autoload | 207 | ;;;###autoload |
| 208 | (defun date-to-day (date) | 208 | (defun date-to-day (date) |
diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el index e6befb10e91..c33ac850722 100644 --- a/lisp/cedet/cedet.el +++ b/lisp/cedet/cedet.el | |||
| @@ -25,15 +25,12 @@ | |||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | ;; | ||
| 29 | ;; This file depends on the major components of CEDET, so that you can | ||
| 30 | ;; load them all by doing (require 'cedet). This is mostly for | ||
| 31 | ;; compatibility with the upstream, stand-alone CEDET distribution. | ||
| 32 | 28 | ||
| 33 | (declare-function inversion-find-version "inversion") | 29 | (declare-function inversion-find-version "inversion") |
| 34 | 30 | ||
| 35 | (defconst cedet-version "2.0" | 31 | (defconst cedet-version "2.0" |
| 36 | "Current version of CEDET.") | 32 | "Current version of CEDET.") |
| 33 | (make-obsolete-variable 'cedet-version 'emacs-version "29.1") | ||
| 37 | 34 | ||
| 38 | (defconst cedet-packages | 35 | (defconst cedet-packages |
| 39 | `( | 36 | `( |
| @@ -45,6 +42,7 @@ | |||
| 45 | (ede "1.2" nil "ede" ) | 42 | (ede "1.2" nil "ede" ) |
| 46 | ) | 43 | ) |
| 47 | "Table of CEDET packages to install.") | 44 | "Table of CEDET packages to install.") |
| 45 | (make-obsolete-variable 'cedet-packages 'package-built-in-p "29.1") | ||
| 48 | 46 | ||
| 49 | (defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu") | 47 | (defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu") |
| 50 | (let ((map (make-sparse-keymap "CEDET menu"))) | 48 | (let ((map (make-sparse-keymap "CEDET menu"))) |
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 4ea14e33c5d..e6bfd0b1e85 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | ;;; ede.el --- Emacs Development Environment gloss -*- lexical-binding: t; -*- | 1 | ;;; ede.el --- Emacs Development Environment gloss -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998-2005, 2007-2022 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998-2022 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> | 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> |
| 6 | ;; Keywords: project, make | 6 | ;; Keywords: project, make |
| 7 | ;; Version: 1.2 | 7 | ;; Version: 2.0 |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
| @@ -39,6 +39,8 @@ | |||
| 39 | ;; | 39 | ;; |
| 40 | ;; (global-ede-mode t) | 40 | ;; (global-ede-mode t) |
| 41 | 41 | ||
| 42 | ;;; Code: | ||
| 43 | |||
| 42 | (require 'cedet) | 44 | (require 'cedet) |
| 43 | (require 'cl-lib) | 45 | (require 'cl-lib) |
| 44 | (require 'eieio) | 46 | (require 'eieio) |
| @@ -66,10 +68,11 @@ | |||
| 66 | 68 | ||
| 67 | (defconst ede-version "2.0" | 69 | (defconst ede-version "2.0" |
| 68 | "Current version of the Emacs EDE.") | 70 | "Current version of the Emacs EDE.") |
| 71 | (make-obsolete-variable 'ede-version 'emacs-version "29.1") | ||
| 69 | 72 | ||
| 70 | ;;; Code: | ||
| 71 | (defun ede-version () | 73 | (defun ede-version () |
| 72 | "Display the current running version of EDE." | 74 | "Display the current running version of EDE." |
| 75 | (declare (obsolete emacs-version "29.1")) | ||
| 73 | (interactive) (message "EDE %s" ede-version)) | 76 | (interactive) (message "EDE %s" ede-version)) |
| 74 | 77 | ||
| 75 | (defgroup ede nil | 78 | (defgroup ede nil |
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index cbe766cedb6..c83e6873679 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el | |||
| @@ -80,7 +80,6 @@ ROOTPROJ is nil, since there is only one project." | |||
| 80 | ;; Doesn't already exist, so let's make one. | 80 | ;; Doesn't already exist, so let's make one. |
| 81 | (let* ((vertuple (ede-emacs-version dir))) | 81 | (let* ((vertuple (ede-emacs-version dir))) |
| 82 | (ede-emacs-project | 82 | (ede-emacs-project |
| 83 | (car vertuple) | ||
| 84 | :name (car vertuple) | 83 | :name (car vertuple) |
| 85 | :version (cdr vertuple) | 84 | :version (cdr vertuple) |
| 86 | :directory (file-name-as-directory dir) | 85 | :directory (file-name-as-directory dir) |
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el index 78002dd8abc..3166279de40 100644 --- a/lisp/cedet/semantic.el +++ b/lisp/cedet/semantic.el | |||
| @@ -34,6 +34,8 @@ | |||
| 34 | ;; menu). To enable it at startup, put (semantic-mode 1) in your init | 34 | ;; menu). To enable it at startup, put (semantic-mode 1) in your init |
| 35 | ;; file. | 35 | ;; file. |
| 36 | 36 | ||
| 37 | ;;; Code: | ||
| 38 | |||
| 37 | (require 'cedet) | 39 | (require 'cedet) |
| 38 | (require 'semantic/tag) | 40 | (require 'semantic/tag) |
| 39 | (require 'semantic/lex) | 41 | (require 'semantic/lex) |
| @@ -41,6 +43,7 @@ | |||
| 41 | 43 | ||
| 42 | (defvar semantic-version "2.2" | 44 | (defvar semantic-version "2.2" |
| 43 | "Current version of Semantic.") | 45 | "Current version of Semantic.") |
| 46 | (make-obsolete-variable 'semantic-version 'emacs-version "29.1") | ||
| 44 | 47 | ||
| 45 | (declare-function inversion-test "inversion") | 48 | (declare-function inversion-test "inversion") |
| 46 | (declare-function semanticdb-load-ebrowse-caches "semantic/db-ebrowse") | 49 | (declare-function semanticdb-load-ebrowse-caches "semantic/db-ebrowse") |
| @@ -73,9 +76,6 @@ introduced." | |||
| 73 | 76 | ||
| 74 | (require 'semantic/fw) | 77 | (require 'semantic/fw) |
| 75 | 78 | ||
| 76 | ;;; Code: | ||
| 77 | ;; | ||
| 78 | |||
| 79 | ;;; Variables and Configuration | 79 | ;;; Variables and Configuration |
| 80 | ;; | 80 | ;; |
| 81 | (defvar-local semantic--parse-table nil | 81 | (defvar-local semantic--parse-table nil |
diff --git a/lisp/cedet/semantic/bovine.el b/lisp/cedet/semantic/bovine.el index 1e52b1f8504..a6cf8d89a4f 100644 --- a/lisp/cedet/semantic/bovine.el +++ b/lisp/cedet/semantic/bovine.el | |||
| @@ -143,14 +143,14 @@ list of semantic tokens found." | |||
| 143 | cvl nil ;re-init the collected value list. | 143 | cvl nil ;re-init the collected value list. |
| 144 | lte (car matchlist) ;Get the local matchlist entry. | 144 | lte (car matchlist) ;Get the local matchlist entry. |
| 145 | ) | 145 | ) |
| 146 | (if (or (byte-code-function-p (car lte)) | 146 | (if (or (compiled-function-p (car lte)) |
| 147 | (listp (car lte))) | 147 | (listp (car lte))) |
| 148 | ;; In this case, we have an EMPTY match! Make | 148 | ;; In this case, we have an EMPTY match! Make |
| 149 | ;; stuff up. | 149 | ;; stuff up. |
| 150 | (setq cvl (list nil)))) | 150 | (setq cvl (list nil)))) |
| 151 | 151 | ||
| 152 | (while (and lte | 152 | (while (and lte |
| 153 | (not (byte-code-function-p (car lte))) | 153 | (not (compiled-function-p (car lte))) |
| 154 | (not (listp (car lte)))) | 154 | (not (listp (car lte)))) |
| 155 | 155 | ||
| 156 | ;; GRAMMAR SOURCE DEBUGGING! | 156 | ;; GRAMMAR SOURCE DEBUGGING! |
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index d00ab47ce69..e2c9d618ba2 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | (require 'cedet-files) | 29 | (require 'cedet-files) |
| 30 | (require 'data-debug) | 30 | (require 'data-debug) |
| 31 | 31 | ||
| 32 | (defvar semanticdb-file-version semantic-version | 32 | (defvar semanticdb-file-version "2.2" |
| 33 | "Version of semanticdb we are writing files to disk with.") | 33 | "Version of semanticdb we are writing files to disk with.") |
| 34 | (defvar semanticdb-file-incompatible-version "1.4" | 34 | (defvar semanticdb-file-incompatible-version "1.4" |
| 35 | "Version of semanticdb we are not reverse compatible with.") | 35 | "Version of semanticdb we are not reverse compatible with.") |
diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 17cd3b1d59a..e24f6128a68 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | ;;; Code: | 38 | ;;; Code: |
| 39 | (require 'semantic/wisent) | 39 | (require 'semantic/wisent) |
| 40 | (eval-when-compile (require 'cl-lib)) | 40 | (eval-when-compile (require 'cl-lib)) |
| 41 | (eval-when-compile (require 'subr-x)) ; `string-pad' | 41 | (require 'subr-x) ; `string-pad' |
| 42 | 42 | ||
| 43 | ;;;; ------------------- | 43 | ;;;; ------------------- |
| 44 | ;;;; Misc. useful things | 44 | ;;;; Misc. useful things |
diff --git a/lisp/cedet/srecode.el b/lisp/cedet/srecode.el index 7c054d4c100..9691f906a4c 100644 --- a/lisp/cedet/srecode.el +++ b/lisp/cedet/srecode.el | |||
| @@ -37,14 +37,16 @@ | |||
| 37 | ;; | 37 | ;; |
| 38 | ;; See the srecode manual for specific details. | 38 | ;; See the srecode manual for specific details. |
| 39 | 39 | ||
| 40 | ;;; Code: | ||
| 41 | |||
| 40 | (require 'eieio) | 42 | (require 'eieio) |
| 41 | (require 'mode-local) | 43 | (require 'mode-local) |
| 42 | (load "srecode/loaddefs" nil 'nomessage) | 44 | (load "srecode/loaddefs" nil 'nomessage) |
| 43 | 45 | ||
| 44 | (defvar srecode-version "1.2" | 46 | (defvar srecode-version "1.2" |
| 45 | "Current version of the Semantic Recoder.") | 47 | "Current version of the Semantic Recoder.") |
| 48 | (make-obsolete-variable 'srecode-version 'emacs-version "29.1") | ||
| 46 | 49 | ||
| 47 | ;;; Code: | ||
| 48 | (defgroup srecode nil | 50 | (defgroup srecode nil |
| 49 | "Semantic Recoder." | 51 | "Semantic Recoder." |
| 50 | :group 'extensions | 52 | :group 'extensions |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 16971aa6611..7fad031add6 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -655,7 +655,9 @@ The character information includes: | |||
| 655 | ("file code" | 655 | ("file code" |
| 656 | ,@(if multibyte-p | 656 | ,@(if multibyte-p |
| 657 | (let* ((coding buffer-file-coding-system) | 657 | (let* ((coding buffer-file-coding-system) |
| 658 | (encoded (encode-coding-char char coding charset))) | 658 | (encoded |
| 659 | (and coding | ||
| 660 | (encode-coding-char char coding charset)))) | ||
| 659 | (if encoded | 661 | (if encoded |
| 660 | (list (encoded-string-description encoded coding) | 662 | (list (encoded-string-description encoded coding) |
| 661 | (format "(encoded by coding system %S)" | 663 | (format "(encoded by coding system %S)" |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 2a2bcca7007..d383650f4e5 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -1054,9 +1054,9 @@ | |||
| 1054 | ;; (print "Let's clean up now!")) | 1054 | ;; (print "Let's clean up now!")) |
| 1055 | ;; foo | 1055 | ;; foo |
| 1056 | ;; | 1056 | ;; |
| 1057 | ;; Now `foo's advice is byte-compiled: | 1057 | ;; Now `foo's advice is compiled: |
| 1058 | ;; | 1058 | ;; |
| 1059 | ;; (byte-code-function-p 'ad-Advice-foo) | 1059 | ;; (compiled-function-p 'ad-Advice-foo) |
| 1060 | ;; t | 1060 | ;; t |
| 1061 | ;; | 1061 | ;; |
| 1062 | ;; (foo 3) | 1062 | ;; (foo 3) |
| @@ -1298,7 +1298,7 @@ | |||
| 1298 | ;; constructed during preactivation was used, even though we did not specify | 1298 | ;; constructed during preactivation was used, even though we did not specify |
| 1299 | ;; the `compile' flag: | 1299 | ;; the `compile' flag: |
| 1300 | ;; | 1300 | ;; |
| 1301 | ;; (byte-code-function-p 'ad-Advice-fum) | 1301 | ;; (compiled-function-p 'ad-Advice-fum) |
| 1302 | ;; t | 1302 | ;; t |
| 1303 | ;; | 1303 | ;; |
| 1304 | ;; (fum 2) | 1304 | ;; (fum 2) |
| @@ -1329,7 +1329,7 @@ | |||
| 1329 | ;; | 1329 | ;; |
| 1330 | ;; A new uncompiled advised definition got constructed: | 1330 | ;; A new uncompiled advised definition got constructed: |
| 1331 | ;; | 1331 | ;; |
| 1332 | ;; (byte-code-function-p 'ad-Advice-fum) | 1332 | ;; (compiled-function-p 'ad-Advice-fum) |
| 1333 | ;; nil | 1333 | ;; nil |
| 1334 | ;; | 1334 | ;; |
| 1335 | ;; (fum 2) | 1335 | ;; (fum 2) |
| @@ -1580,8 +1580,6 @@ | |||
| 1580 | :link '(custom-manual "(elisp)Advising Functions") | 1580 | :link '(custom-manual "(elisp)Advising Functions") |
| 1581 | :group 'lisp) | 1581 | :group 'lisp) |
| 1582 | 1582 | ||
| 1583 | (defconst ad-version "2.14") | ||
| 1584 | |||
| 1585 | ;;;###autoload | 1583 | ;;;###autoload |
| 1586 | (defcustom ad-redefinition-action 'warn | 1584 | (defcustom ad-redefinition-action 'warn |
| 1587 | "Defines what to do with redefinitions during Advice de/activation. | 1585 | "Defines what to do with redefinitions during Advice de/activation. |
| @@ -2118,9 +2116,9 @@ the cache-id will clear the cache." | |||
| 2118 | 2116 | ||
| 2119 | (defsubst ad-compiled-p (definition) | 2117 | (defsubst ad-compiled-p (definition) |
| 2120 | "Return non-nil if DEFINITION is a compiled byte-code object." | 2118 | "Return non-nil if DEFINITION is a compiled byte-code object." |
| 2121 | (or (byte-code-function-p definition) | 2119 | (or (compiled-function-p definition) |
| 2122 | (and (macrop definition) | 2120 | (and (macrop definition) |
| 2123 | (byte-code-function-p (ad-lambdafy definition))))) | 2121 | (compiled-function-p (ad-lambdafy definition))))) |
| 2124 | 2122 | ||
| 2125 | (defsubst ad-compiled-code (compiled-definition) | 2123 | (defsubst ad-compiled-code (compiled-definition) |
| 2126 | "Return the byte-code object of a COMPILED-DEFINITION." | 2124 | "Return the byte-code object of a COMPILED-DEFINITION." |
| @@ -3250,6 +3248,9 @@ Use only in REAL emergencies." | |||
| 3250 | (message "Oops! Left over advised function %S" function) | 3248 | (message "Oops! Left over advised function %S" function) |
| 3251 | (ad-pop-advised-function function))) | 3249 | (ad-pop-advised-function function))) |
| 3252 | 3250 | ||
| 3251 | (defconst ad-version "2.14") | ||
| 3252 | (make-obsolete-variable 'ad-version 'emacs-version "29.1") | ||
| 3253 | |||
| 3253 | (provide 'advice) | 3254 | (provide 'advice) |
| 3254 | 3255 | ||
| 3255 | ;;; advice.el ends here | 3256 | ;;; advice.el ends here |
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 7a4bbf2e8af..52e00952846 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -1207,25 +1207,26 @@ See Info node `(elisp) Integer Basics'." | |||
| 1207 | form))) | 1207 | form))) |
| 1208 | 1208 | ||
| 1209 | (defun byte-optimize-apply (form) | 1209 | (defun byte-optimize-apply (form) |
| 1210 | ;; If the last arg is a literal constant, turn this into a funcall. | 1210 | (let ((len (length form))) |
| 1211 | ;; The funcall optimizer can then transform (funcall 'foo ...) -> (foo ...). | 1211 | (if (>= len 2) |
| 1212 | (if (= (length form) 2) | 1212 | (let ((fn (nth 1 form)) |
| 1213 | ;; single-argument `apply' is not worth optimizing (bug#40968) | 1213 | (last (nth (1- len) form))) |
| 1214 | form | 1214 | (cond |
| 1215 | (let ((fn (nth 1 form)) | 1215 | ;; (apply F ... '(X Y ...)) -> (funcall F ... 'X 'Y ...) |
| 1216 | (last (nth (1- (length form)) form))) ; I think this really is fastest | 1216 | ((or (null last) |
| 1217 | (or (if (or (null last) | 1217 | (eq (car-safe last) 'quote)) |
| 1218 | (eq (car-safe last) 'quote)) | 1218 | (let ((last-value (nth 1 last))) |
| 1219 | (if (listp (nth 1 last)) | 1219 | (if (listp last-value) |
| 1220 | (let ((butlast (nreverse (cdr (reverse (cdr (cdr form))))))) | 1220 | `(funcall ,fn ,@(butlast (cddr form)) |
| 1221 | (nconc (list 'funcall fn) butlast | 1221 | ,@(mapcar (lambda (x) (list 'quote x)) last-value)) |
| 1222 | (mapcar (lambda (x) (list 'quote x)) (nth 1 last)))) | ||
| 1223 | (byte-compile-warn-x | 1222 | (byte-compile-warn-x |
| 1224 | last | 1223 | last "last arg to apply can't be a literal atom: `%s'" last) |
| 1225 | "last arg to apply can't be a literal atom: `%s'" | 1224 | nil))) |
| 1226 | last) | 1225 | ;; (apply F ... (list X Y ...)) -> (funcall F ... X Y ...) |
| 1227 | nil)) | 1226 | ((eq (car-safe last) 'list) |
| 1228 | form)))) | 1227 | `(funcall ,fn ,@(butlast (cddr form)) ,@(cdr last))) |
| 1228 | (t form))) | ||
| 1229 | form))) | ||
| 1229 | 1230 | ||
| 1230 | (put 'funcall 'byte-optimizer #'byte-optimize-funcall) | 1231 | (put 'funcall 'byte-optimizer #'byte-optimize-funcall) |
| 1231 | (put 'apply 'byte-optimizer #'byte-optimize-apply) | 1232 | (put 'apply 'byte-optimizer #'byte-optimize-apply) |
| @@ -1747,10 +1748,10 @@ See Info node `(elisp) Integer Basics'." | |||
| 1747 | byte-goto-if-not-nil-else-pop)) | 1748 | byte-goto-if-not-nil-else-pop)) |
| 1748 | 1749 | ||
| 1749 | (defconst byte-after-unbind-ops | 1750 | (defconst byte-after-unbind-ops |
| 1750 | '(byte-constant byte-dup | 1751 | '(byte-constant byte-dup byte-stack-ref byte-stack-set byte-discard |
| 1751 | byte-symbolp byte-consp byte-stringp byte-listp byte-numberp byte-integerp | 1752 | byte-symbolp byte-consp byte-stringp byte-listp byte-numberp byte-integerp |
| 1752 | byte-eq byte-not | 1753 | byte-eq byte-not |
| 1753 | byte-cons byte-list1 byte-list2 ; byte-list3 byte-list4 | 1754 | byte-cons byte-list1 byte-list2 byte-list3 byte-list4 byte-listN |
| 1754 | byte-interactive-p) | 1755 | byte-interactive-p) |
| 1755 | ;; How about other side-effect-free-ops? Is it safe to move an | 1756 | ;; How about other side-effect-free-ops? Is it safe to move an |
| 1756 | ;; error invocation (such as from nth) out of an unwind-protect? | 1757 | ;; error invocation (such as from nth) out of an unwind-protect? |
| @@ -1762,7 +1763,8 @@ See Info node `(elisp) Integer Basics'." | |||
| 1762 | (defconst byte-compile-side-effect-and-error-free-ops | 1763 | (defconst byte-compile-side-effect-and-error-free-ops |
| 1763 | '(byte-constant byte-dup byte-symbolp byte-consp byte-stringp byte-listp | 1764 | '(byte-constant byte-dup byte-symbolp byte-consp byte-stringp byte-listp |
| 1764 | byte-integerp byte-numberp byte-eq byte-equal byte-not byte-car-safe | 1765 | byte-integerp byte-numberp byte-eq byte-equal byte-not byte-car-safe |
| 1765 | byte-cdr-safe byte-cons byte-list1 byte-list2 byte-point byte-point-max | 1766 | byte-cdr-safe byte-cons byte-list1 byte-list2 byte-list3 byte-list4 |
| 1767 | byte-listN byte-point byte-point-max | ||
| 1766 | byte-point-min byte-following-char byte-preceding-char | 1768 | byte-point-min byte-following-char byte-preceding-char |
| 1767 | byte-current-column byte-eolp byte-eobp byte-bolp byte-bobp | 1769 | byte-current-column byte-eolp byte-eobp byte-bolp byte-bobp |
| 1768 | byte-current-buffer byte-stack-ref)) | 1770 | byte-current-buffer byte-stack-ref)) |
| @@ -2113,13 +2115,15 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." | |||
| 2113 | (setcar (cdr rest) lap0) | 2115 | (setcar (cdr rest) lap0) |
| 2114 | (setq keep-going t)) | 2116 | (setq keep-going t)) |
| 2115 | ;; | 2117 | ;; |
| 2116 | ;; varbind-X unbind-N --> discard unbind-(N-1) | 2118 | ;; varbind-X unbind-N --> discard unbind-(N-1) |
| 2117 | ;; save-excursion unbind-N --> unbind-(N-1) | 2119 | ;; save-excursion unbind-N --> unbind-(N-1) |
| 2118 | ;; save-restriction unbind-N --> unbind-(N-1) | 2120 | ;; save-restriction unbind-N --> unbind-(N-1) |
| 2121 | ;; save-current-buffer unbind-N --> unbind-(N-1) | ||
| 2119 | ;; | 2122 | ;; |
| 2120 | ((and (eq 'byte-unbind (car lap1)) | 2123 | ((and (eq 'byte-unbind (car lap1)) |
| 2121 | (memq (car lap0) '(byte-varbind byte-save-excursion | 2124 | (memq (car lap0) '(byte-varbind byte-save-excursion |
| 2122 | byte-save-restriction)) | 2125 | byte-save-restriction |
| 2126 | byte-save-current-buffer)) | ||
| 2123 | (< 0 (cdr lap1))) | 2127 | (< 0 (cdr lap1))) |
| 2124 | (if (zerop (setcdr lap1 (1- (cdr lap1)))) | 2128 | (if (zerop (setcdr lap1 (1- (cdr lap1)))) |
| 2125 | (delq lap1 rest)) | 2129 | (delq lap1 rest)) |
| @@ -2475,8 +2479,7 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." | |||
| 2475 | ;; itself, compile some of its most used recursive functions (at load time). | 2479 | ;; itself, compile some of its most used recursive functions (at load time). |
| 2476 | ;; | 2480 | ;; |
| 2477 | (eval-when-compile | 2481 | (eval-when-compile |
| 2478 | (or (byte-code-function-p (symbol-function 'byte-optimize-form)) | 2482 | (or (compiled-function-p (symbol-function 'byte-optimize-form)) |
| 2479 | (subr-native-elisp-p (symbol-function 'byte-optimize-form)) | ||
| 2480 | (assq 'byte-code (symbol-function 'byte-optimize-form)) | 2483 | (assq 'byte-code (symbol-function 'byte-optimize-form)) |
| 2481 | (let ((byte-optimize nil) | 2484 | (let ((byte-optimize nil) |
| 2482 | (byte-compile-warnings nil)) | 2485 | (byte-compile-warnings nil)) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 9d5f6682b5a..907015eb48e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1395,7 +1395,7 @@ when printing the error message." | |||
| 1395 | (or (symbolp (symbol-function fn)) | 1395 | (or (symbolp (symbol-function fn)) |
| 1396 | (consp (symbol-function fn)) | 1396 | (consp (symbol-function fn)) |
| 1397 | (and (not macro-p) | 1397 | (and (not macro-p) |
| 1398 | (byte-code-function-p (symbol-function fn))))) | 1398 | (compiled-function-p (symbol-function fn))))) |
| 1399 | (setq fn (symbol-function fn))) | 1399 | (setq fn (symbol-function fn))) |
| 1400 | (let ((advertised (gethash (if (and (symbolp fn) (fboundp fn)) | 1400 | (let ((advertised (gethash (if (and (symbolp fn) (fboundp fn)) |
| 1401 | ;; Could be a subr. | 1401 | ;; Could be a subr. |
| @@ -1407,7 +1407,7 @@ when printing the error message." | |||
| 1407 | (if macro-p | 1407 | (if macro-p |
| 1408 | `(macro lambda ,advertised) | 1408 | `(macro lambda ,advertised) |
| 1409 | `(lambda ,advertised))) | 1409 | `(lambda ,advertised))) |
| 1410 | ((and (not macro-p) (byte-code-function-p fn)) fn) | 1410 | ((and (not macro-p) (compiled-function-p fn)) fn) |
| 1411 | ((not (consp fn)) nil) | 1411 | ((not (consp fn)) nil) |
| 1412 | ((eq 'macro (car fn)) (cdr fn)) | 1412 | ((eq 'macro (car fn)) (cdr fn)) |
| 1413 | (macro-p nil) | 1413 | (macro-p nil) |
| @@ -2946,11 +2946,11 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 2946 | (setq fun (cdr fun))) | 2946 | (setq fun (cdr fun))) |
| 2947 | (prog1 | 2947 | (prog1 |
| 2948 | (cond | 2948 | (cond |
| 2949 | ;; Up until Emacs-24.1, byte-compile silently did nothing when asked to | 2949 | ;; Up until Emacs-24.1, byte-compile silently did nothing |
| 2950 | ;; compile something invalid. So let's tune down the complaint from an | 2950 | ;; when asked to compile something invalid. So let's tone |
| 2951 | ;; error to a simple message for the known case where signaling an error | 2951 | ;; down the complaint from an error to a simple message for |
| 2952 | ;; causes problems. | 2952 | ;; the known case where signaling an error causes problems. |
| 2953 | ((byte-code-function-p fun) | 2953 | ((compiled-function-p fun) |
| 2954 | (message "Function %s is already compiled" | 2954 | (message "Function %s is already compiled" |
| 2955 | (if (symbolp form) form "provided")) | 2955 | (if (symbolp form) form "provided")) |
| 2956 | fun) | 2956 | fun) |
| @@ -3527,7 +3527,7 @@ lambda-expression." | |||
| 3527 | (byte-compile-out-tag endtag))) | 3527 | (byte-compile-out-tag endtag))) |
| 3528 | 3528 | ||
| 3529 | (defun byte-compile-unfold-bcf (form) | 3529 | (defun byte-compile-unfold-bcf (form) |
| 3530 | "Inline call to byte-code-functions." | 3530 | "Inline call to byte-code function." |
| 3531 | (let* ((byte-compile-bound-variables byte-compile-bound-variables) | 3531 | (let* ((byte-compile-bound-variables byte-compile-bound-variables) |
| 3532 | (fun (car form)) | 3532 | (fun (car form)) |
| 3533 | (fargs (aref fun 0)) | 3533 | (fargs (aref fun 0)) |
| @@ -5254,11 +5254,13 @@ invoked interactively." | |||
| 5254 | ((not (consp f)) | 5254 | ((not (consp f)) |
| 5255 | "<malformed function>") | 5255 | "<malformed function>") |
| 5256 | ((eq 'macro (car f)) | 5256 | ((eq 'macro (car f)) |
| 5257 | (if (or (byte-code-function-p (cdr f)) | 5257 | (if (or (compiled-function-p (cdr f)) |
| 5258 | ;; FIXME: Can this still happen? | ||
| 5258 | (assq 'byte-code (cdr (cdr (cdr f))))) | 5259 | (assq 'byte-code (cdr (cdr (cdr f))))) |
| 5259 | " <compiled macro>" | 5260 | " <compiled macro>" |
| 5260 | " <macro>")) | 5261 | " <macro>")) |
| 5261 | ((assq 'byte-code (cdr (cdr f))) | 5262 | ((assq 'byte-code (cdr (cdr f))) |
| 5263 | ;; FIXME: Can this still happen? | ||
| 5262 | "<compiled lambda>") | 5264 | "<compiled lambda>") |
| 5263 | ((eq 'lambda (car f)) | 5265 | ((eq 'lambda (car f)) |
| 5264 | "<function>") | 5266 | "<function>") |
| @@ -5507,9 +5509,7 @@ and corresponding effects." | |||
| 5507 | ;; itself, compile some of its most used recursive functions (at load time). | 5509 | ;; itself, compile some of its most used recursive functions (at load time). |
| 5508 | ;; | 5510 | ;; |
| 5509 | (eval-when-compile | 5511 | (eval-when-compile |
| 5510 | (or (byte-code-function-p (symbol-function 'byte-compile-form)) | 5512 | (or (compiled-function-p (symbol-function 'byte-compile-form)) |
| 5511 | (subr-native-elisp-p (symbol-function 'byte-compile-form)) | ||
| 5512 | (assq 'byte-code (symbol-function 'byte-compile-form)) | ||
| 5513 | (let ((byte-optimize nil) ; do it fast | 5513 | (let ((byte-optimize nil) ; do it fast |
| 5514 | (byte-compile-warnings nil)) | 5514 | (byte-compile-warnings nil)) |
| 5515 | (mapc (lambda (x) | 5515 | (mapc (lambda (x) |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index ac589b82f83..04ead562f2f 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; checkdoc.el --- check documentation strings for style requirements -*- lexical-binding:t -*- | 1 | ;;; checkdoc.el --- check documentation strings for style requirements -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997-1998, 2001-2022 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997-2022 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> | 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> |
| 6 | ;; Old-Version: 0.6.2 | 6 | ;; Old-Version: 0.6.2 |
| @@ -1357,23 +1357,6 @@ checking of documentation strings. | |||
| 1357 | checkdoc-common-verbs-wrong-voice "\\|") | 1357 | checkdoc-common-verbs-wrong-voice "\\|") |
| 1358 | "\\)\\>")))) | 1358 | "\\)\\>")))) |
| 1359 | 1359 | ||
| 1360 | ;; Profiler says this is not yet faster than just calling assoc | ||
| 1361 | ;;(defun checkdoc-word-in-alist-vector (word vector) | ||
| 1362 | ;; "Check to see if WORD is in the car of an element of VECTOR. | ||
| 1363 | ;;VECTOR must be sorted. The CDR should be a replacement. Since the | ||
| 1364 | ;;word list is getting bigger, it is time for a quick bisecting search." | ||
| 1365 | ;; (let ((max (length vector)) (min 0) i | ||
| 1366 | ;; (found nil) (fw nil)) | ||
| 1367 | ;; (setq i (/ max 2)) | ||
| 1368 | ;; (while (and (not found) (/= min max)) | ||
| 1369 | ;; (setq fw (car (aref vector i))) | ||
| 1370 | ;; (cond ((string= word fw) (setq found (cdr (aref vector i)))) | ||
| 1371 | ;; ((string< word fw) (setq max i)) | ||
| 1372 | ;; (t (setq min i))) | ||
| 1373 | ;; (setq i (/ (+ max min) 2)) | ||
| 1374 | ;; ) | ||
| 1375 | ;; found)) | ||
| 1376 | |||
| 1377 | ;;; Checking engines | 1360 | ;;; Checking engines |
| 1378 | ;; | 1361 | ;; |
| 1379 | (defun checkdoc-this-string-valid (&optional take-notes) | 1362 | (defun checkdoc-this-string-valid (&optional take-notes) |
| @@ -2860,8 +2843,6 @@ function called to create the messages." | |||
| 2860 | 2843 | ||
| 2861 | (custom-add-option 'emacs-lisp-mode-hook 'checkdoc-minor-mode) | 2844 | (custom-add-option 'emacs-lisp-mode-hook 'checkdoc-minor-mode) |
| 2862 | 2845 | ||
| 2863 | ;; Obsolete | ||
| 2864 | |||
| 2865 | (define-obsolete-function-alias 'checkdoc-run-hooks | 2846 | (define-obsolete-function-alias 'checkdoc-run-hooks |
| 2866 | #'run-hook-with-args-until-success "28.1") | 2847 | #'run-hook-with-args-until-success "28.1") |
| 2867 | (defvar checkdoc-version "0.6.2" | 2848 | (defvar checkdoc-version "0.6.2" |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index eefaa36b911..80ca43c902a 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -3411,7 +3411,7 @@ Of course, we really can't know that for sure, so it's just a heuristic." | |||
| 3411 | (character . natnump) | 3411 | (character . natnump) |
| 3412 | (char-table . char-table-p) | 3412 | (char-table . char-table-p) |
| 3413 | (command . commandp) | 3413 | (command . commandp) |
| 3414 | (compiled-function . byte-code-function-p) | 3414 | (compiled-function . compiled-function-p) |
| 3415 | (hash-table . hash-table-p) | 3415 | (hash-table . hash-table-p) |
| 3416 | (cons . consp) | 3416 | (cons . consp) |
| 3417 | (fixnum . fixnump) | 3417 | (fixnum . fixnump) |
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index c8ff6b68144..047b0069bb9 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el | |||
| @@ -1813,8 +1813,7 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\ | |||
| 1813 | (unless (or (null tests) (zerop high)) | 1813 | (unless (or (null tests) (zerop high)) |
| 1814 | (message "\nLONG-RUNNING TESTS") | 1814 | (message "\nLONG-RUNNING TESTS") |
| 1815 | (message "------------------") | 1815 | (message "------------------") |
| 1816 | (setq tests (sort tests (lambda (x y) (> (car x) (car y))))) | 1816 | (setq tests (ntake high (sort tests (lambda (x y) (> (car x) (car y)))))) |
| 1817 | (when (< high (length tests)) (setcdr (nthcdr (1- high) tests) nil)) | ||
| 1818 | (message "%s" (mapconcat #'cdr tests "\n"))) | 1817 | (message "%s" (mapconcat #'cdr tests "\n"))) |
| 1819 | ;; More details on hydra and emba, where the logs are harder to get to. | 1818 | ;; More details on hydra and emba, where the logs are harder to get to. |
| 1820 | (when (and (or (getenv "EMACS_HYDRA_CI") (getenv "EMACS_EMBA_CI")) | 1819 | (when (and (or (getenv "EMACS_HYDRA_CI") (getenv "EMACS_EMBA_CI")) |
diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el index 654dbbc5fef..10bb2973253 100644 --- a/lisp/emacs-lisp/helper.el +++ b/lisp/emacs-lisp/helper.el | |||
| @@ -131,7 +131,6 @@ | |||
| 131 | (defun Helper-describe-bindings () | 131 | (defun Helper-describe-bindings () |
| 132 | "Describe local key bindings of current mode." | 132 | "Describe local key bindings of current mode." |
| 133 | (interactive) | 133 | (interactive) |
| 134 | (message "Making binding list...") | ||
| 135 | (save-window-excursion (describe-bindings)) | 134 | (save-window-excursion (describe-bindings)) |
| 136 | (Helper-help-scroller)) | 135 | (Helper-help-scroller)) |
| 137 | 136 | ||
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 3b329357ad9..31e1514193f 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el | |||
| @@ -519,15 +519,21 @@ binds `generated-autoload-file' as a file-local variable, write | |||
| 519 | its autoloads into the specified file instead. | 519 | its autoloads into the specified file instead. |
| 520 | 520 | ||
| 521 | The function does NOT recursively descend into subdirectories of the | 521 | The function does NOT recursively descend into subdirectories of the |
| 522 | directory or directories specified. | 522 | directory or directories specified by DIRS. |
| 523 | 523 | ||
| 524 | If EXTRA-DATA, include this string at the start of the generated | 524 | Optional argument EXCLUDED-FILES, if non-nil, should be a list of |
| 525 | file. This will also force generation of OUTPUT-FILE even if | 525 | files, such as preloaded files, whose autoloads should not be written |
| 526 | there are no autoloads to put into the file. | 526 | to OUTPUT-FILE. |
| 527 | 527 | ||
| 528 | If INCLUDE-PACKAGE-VERSION, include package version data. | 528 | If EXTRA-DATA is non-nil, it should be a string; include that string |
| 529 | at the beginning of the generated file. This will also force the | ||
| 530 | generation of OUTPUT-FILE even if there are no autoloads to put into | ||
| 531 | that file. | ||
| 529 | 532 | ||
| 530 | If GENERATE-FULL, don't update, but regenerate all the loaddefs files." | 533 | If INCLUDE-PACKAGE-VERSION is non-nil, include package version data. |
| 534 | |||
| 535 | If GENERATE-FULL is non-nil, regenerate all the loaddefs files anew, | ||
| 536 | instead of just updating them with the new/changed autoloads." | ||
| 531 | (let* ((files-re (let ((tmp nil)) | 537 | (let* ((files-re (let ((tmp nil)) |
| 532 | (dolist (suf (get-load-suffixes)) | 538 | (dolist (suf (get-load-suffixes)) |
| 533 | ;; We don't use module-file-suffix below because | 539 | ;; We don't use module-file-suffix below because |
| @@ -545,6 +551,11 @@ If GENERATE-FULL, don't update, but regenerate all the loaddefs files." | |||
| 545 | (updating (and (file-exists-p output-file) (not generate-full))) | 551 | (updating (and (file-exists-p output-file) (not generate-full))) |
| 546 | (defs nil)) | 552 | (defs nil)) |
| 547 | 553 | ||
| 554 | ;; Allow the excluded files to be relative. | ||
| 555 | (setq excluded-files | ||
| 556 | (mapcar (lambda (file) (expand-file-name file dir)) | ||
| 557 | excluded-files)) | ||
| 558 | |||
| 548 | ;; Collect all the autoload data. | 559 | ;; Collect all the autoload data. |
| 549 | (let ((progress (make-progress-reporter | 560 | (let ((progress (make-progress-reporter |
| 550 | (byte-compile-info | 561 | (byte-compile-info |
| @@ -583,7 +594,8 @@ If GENERATE-FULL, don't update, but regenerate all the loaddefs files." | |||
| 583 | ;; We have some data, so generate the loaddef files. First | 594 | ;; We have some data, so generate the loaddef files. First |
| 584 | ;; group per output file. | 595 | ;; group per output file. |
| 585 | (dolist (fdefs (seq-group-by #'car defs)) | 596 | (dolist (fdefs (seq-group-by #'car defs)) |
| 586 | (let ((loaddefs-file (car fdefs))) | 597 | (let ((loaddefs-file (car fdefs)) |
| 598 | hash) | ||
| 587 | (with-temp-buffer | 599 | (with-temp-buffer |
| 588 | (if (and updating (file-exists-p loaddefs-file)) | 600 | (if (and updating (file-exists-p loaddefs-file)) |
| 589 | (insert-file-contents loaddefs-file) | 601 | (insert-file-contents loaddefs-file) |
| @@ -593,6 +605,7 @@ If GENERATE-FULL, don't update, but regenerate all the loaddefs files." | |||
| 593 | (when extra-data | 605 | (when extra-data |
| 594 | (insert extra-data) | 606 | (insert extra-data) |
| 595 | (ensure-empty-lines 1))) | 607 | (ensure-empty-lines 1))) |
| 608 | (setq hash (buffer-hash)) | ||
| 596 | ;; Then group by source file (and sort alphabetically). | 609 | ;; Then group by source file (and sort alphabetically). |
| 597 | (dolist (section (sort (seq-group-by #'cadr (cdr fdefs)) | 610 | (dolist (section (sort (seq-group-by #'cadr (cdr fdefs)) |
| 598 | (lambda (e1 e2) | 611 | (lambda (e1 e2) |
| @@ -629,9 +642,11 @@ If GENERATE-FULL, don't update, but regenerate all the loaddefs files." | |||
| 629 | (loaddefs-generate--print-form def)) | 642 | (loaddefs-generate--print-form def)) |
| 630 | (unless (bolp) | 643 | (unless (bolp) |
| 631 | (insert "\n"))))) | 644 | (insert "\n"))))) |
| 632 | (write-region (point-min) (point-max) loaddefs-file nil 'silent) | 645 | ;; Only write the file if we actually made a change. |
| 633 | (byte-compile-info (file-relative-name loaddefs-file lisp-directory) | 646 | (unless (equal (buffer-hash) hash) |
| 634 | t "GEN"))))))) | 647 | (write-region (point-min) (point-max) loaddefs-file nil 'silent) |
| 648 | (byte-compile-info | ||
| 649 | (file-relative-name loaddefs-file lisp-directory) t "GEN")))))))) | ||
| 635 | 650 | ||
| 636 | (defun loaddefs-generate--print-form (def) | 651 | (defun loaddefs-generate--print-form (def) |
| 637 | "Print DEF in a format that makes sense for version control." | 652 | "Print DEF in a format that makes sense for version control." |
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 6a193a56d2d..5ae9d8368f0 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el | |||
| @@ -823,7 +823,7 @@ test of free variables in the following ways: | |||
| 823 | (eval-when-compile | 823 | (eval-when-compile |
| 824 | (add-hook 'emacs-startup-hook | 824 | (add-hook 'emacs-startup-hook |
| 825 | (lambda () | 825 | (lambda () |
| 826 | (and (not (byte-code-function-p | 826 | (and (not (compiled-function-p |
| 827 | (symbol-function 'macroexpand-all))) | 827 | (symbol-function 'macroexpand-all))) |
| 828 | (locate-library "macroexp.elc") | 828 | (locate-library "macroexp.elc") |
| 829 | (load "macroexp.elc"))))) | 829 | (load "macroexp.elc"))))) |
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 2d5a1b5e77b..a9a20ab5abf 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el | |||
| @@ -167,31 +167,31 @@ DOC is a string where \"FUNCTION\" and \"OLDFUN\" are expected.") | |||
| 167 | 167 | ||
| 168 | (defun advice--interactive-form (function) | 168 | (defun advice--interactive-form (function) |
| 169 | "Like `interactive-form' but tries to avoid autoloading functions." | 169 | "Like `interactive-form' but tries to avoid autoloading functions." |
| 170 | (when (commandp function) | 170 | (if (not (and (symbolp function) (autoloadp (indirect-function function)))) |
| 171 | (if (not (and (symbolp function) (autoloadp (indirect-function function)))) | 171 | (interactive-form function) |
| 172 | (interactive-form function) | 172 | (when (commandp function) |
| 173 | `(interactive (advice-eval-interactive-spec | 173 | `(interactive (advice-eval-interactive-spec |
| 174 | (cadr (interactive-form ',function))))))) | 174 | (cadr (interactive-form ',function))))))) |
| 175 | 175 | ||
| 176 | (defun advice--make-interactive-form (function main) | 176 | (defun advice--make-interactive-form (iff ifm) |
| 177 | ;; TODO: make it so that interactive spec can be a constant which | 177 | ;; TODO: make it so that interactive spec can be a constant which |
| 178 | ;; dynamically checks the advice--car/cdr to do its job. | 178 | ;; dynamically checks the advice--car/cdr to do its job. |
| 179 | ;; For that, advice-eval-interactive-spec needs to be more faithful. | 179 | ;; For that, advice-eval-interactive-spec needs to be more faithful. |
| 180 | (let* ((iff (advice--interactive-form function)) | 180 | (let* ((fspec (cadr iff))) |
| 181 | (ifm (advice--interactive-form main)) | ||
| 182 | (fspec (cadr iff))) | ||
| 183 | (when (eq 'function (car-safe fspec)) ;; Macroexpanded lambda? | 181 | (when (eq 'function (car-safe fspec)) ;; Macroexpanded lambda? |
| 184 | (setq fspec (nth 1 fspec))) | 182 | (setq fspec (eval fspec t))) |
| 185 | (if (functionp fspec) | 183 | (if (functionp fspec) |
| 186 | `(funcall ',fspec ',(cadr ifm)) | 184 | `(funcall ',fspec ',(cadr ifm)) |
| 187 | (cadr (or iff ifm))))) | 185 | (cadr (or iff ifm))))) |
| 188 | 186 | ||
| 189 | 187 | ||
| 190 | (cl-defmethod oclosure-interactive-form ((ad advice) &optional _) | 188 | (cl-defmethod oclosure-interactive-form ((ad advice) &optional _) |
| 191 | (let ((car (advice--car ad)) | 189 | (let* ((car (advice--car ad)) |
| 192 | (cdr (advice--cdr ad))) | 190 | (cdr (advice--cdr ad)) |
| 193 | (when (or (commandp car) (commandp cdr)) | 191 | (ifa (advice--interactive-form car)) |
| 194 | `(interactive ,(advice--make-interactive-form car cdr))))) | 192 | (ifd (advice--interactive-form cdr))) |
| 193 | (when (or ifa ifd) | ||
| 194 | `(interactive ,(advice--make-interactive-form ifa ifd))))) | ||
| 195 | 195 | ||
| 196 | (cl-defmethod cl-print-object ((object advice) stream) | 196 | (cl-defmethod cl-print-object ((object advice) stream) |
| 197 | (cl-assert (advice--p object)) | 197 | (cl-assert (advice--p object)) |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index d2959f7728c..ed23ee5f221 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -3530,7 +3530,7 @@ If optional arg BUTTON is non-nil, describe its associated package." | |||
| 3530 | (let ((place (cdr desc)) | 3530 | (let ((place (cdr desc)) |
| 3531 | (out (copy-sequence (car desc)))) | 3531 | (out (copy-sequence (car desc)))) |
| 3532 | (add-text-properties place (1+ place) | 3532 | (add-text-properties place (1+ place) |
| 3533 | '(face (bold font-lock-warning-face)) | 3533 | '(face help-key-binding) |
| 3534 | out) | 3534 | out) |
| 3535 | out)) | 3535 | out)) |
| 3536 | (package--prettify-quick-help-key (cons desc 0)))) | 3536 | (package--prettify-quick-help-key (cons desc 0)))) |
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 07443dabfef..10bd4bc6886 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el | |||
| @@ -607,31 +607,38 @@ recording whether the var has been referenced by earlier parts of the match." | |||
| 607 | (symbolp . vectorp) | 607 | (symbolp . vectorp) |
| 608 | (symbolp . stringp) | 608 | (symbolp . stringp) |
| 609 | (symbolp . byte-code-function-p) | 609 | (symbolp . byte-code-function-p) |
| 610 | (symbolp . compiled-function-p) | ||
| 610 | (symbolp . recordp) | 611 | (symbolp . recordp) |
| 611 | (integerp . consp) | 612 | (integerp . consp) |
| 612 | (integerp . arrayp) | 613 | (integerp . arrayp) |
| 613 | (integerp . vectorp) | 614 | (integerp . vectorp) |
| 614 | (integerp . stringp) | 615 | (integerp . stringp) |
| 615 | (integerp . byte-code-function-p) | 616 | (integerp . byte-code-function-p) |
| 617 | (integerp . compiled-function-p) | ||
| 616 | (integerp . recordp) | 618 | (integerp . recordp) |
| 617 | (numberp . consp) | 619 | (numberp . consp) |
| 618 | (numberp . arrayp) | 620 | (numberp . arrayp) |
| 619 | (numberp . vectorp) | 621 | (numberp . vectorp) |
| 620 | (numberp . stringp) | 622 | (numberp . stringp) |
| 621 | (numberp . byte-code-function-p) | 623 | (numberp . byte-code-function-p) |
| 624 | (numberp . compiled-function-p) | ||
| 622 | (numberp . recordp) | 625 | (numberp . recordp) |
| 623 | (consp . arrayp) | 626 | (consp . arrayp) |
| 624 | (consp . atom) | 627 | (consp . atom) |
| 625 | (consp . vectorp) | 628 | (consp . vectorp) |
| 626 | (consp . stringp) | 629 | (consp . stringp) |
| 627 | (consp . byte-code-function-p) | 630 | (consp . byte-code-function-p) |
| 631 | (consp . compiled-function-p) | ||
| 628 | (consp . recordp) | 632 | (consp . recordp) |
| 629 | (arrayp . byte-code-function-p) | 633 | (arrayp . byte-code-function-p) |
| 634 | (arrayp . compiled-function-p) | ||
| 630 | (vectorp . byte-code-function-p) | 635 | (vectorp . byte-code-function-p) |
| 636 | (vectorp . compiled-function-p) | ||
| 631 | (vectorp . recordp) | 637 | (vectorp . recordp) |
| 632 | (stringp . vectorp) | 638 | (stringp . vectorp) |
| 633 | (stringp . recordp) | 639 | (stringp . recordp) |
| 634 | (stringp . byte-code-function-p))) | 640 | (stringp . byte-code-function-p) |
| 641 | (stringp . compiled-function-p))) | ||
| 635 | 642 | ||
| 636 | (defun pcase--mutually-exclusive-p (pred1 pred2) | 643 | (defun pcase--mutually-exclusive-p (pred1 pred2) |
| 637 | (or (member (cons pred1 pred2) | 644 | (or (member (cons pred1 pred2) |
| @@ -771,8 +778,8 @@ A and B can be one of: | |||
| 771 | ((consp (cadr pat)) #'consp) | 778 | ((consp (cadr pat)) #'consp) |
| 772 | ((stringp (cadr pat)) #'stringp) | 779 | ((stringp (cadr pat)) #'stringp) |
| 773 | ((vectorp (cadr pat)) #'vectorp) | 780 | ((vectorp (cadr pat)) #'vectorp) |
| 774 | ((byte-code-function-p (cadr pat)) | 781 | ((compiled-function-p (cadr pat)) |
| 775 | #'byte-code-function-p)))) | 782 | #'compiled-function-p)))) |
| 776 | (pcase--mutually-exclusive-p (cadr upat) otherpred)) | 783 | (pcase--mutually-exclusive-p (cadr upat) otherpred)) |
| 777 | '(:pcase--fail . nil)) | 784 | '(:pcase--fail . nil)) |
| 778 | ;; Since we turn (or 'a 'b 'c) into (pred (pcase--flip (memq '(a b c)))) | 785 | ;; Since we turn (or 'a 'b 'c) into (pred (pcase--flip (memq '(a b c)))) |
diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el index 2b2039f9d15..e8b92a532fa 100644 --- a/lisp/emacs-lisp/ring.el +++ b/lisp/emacs-lisp/ring.el | |||
| @@ -42,6 +42,8 @@ | |||
| 42 | 42 | ||
| 43 | ;;; Code: | 43 | ;;; Code: |
| 44 | 44 | ||
| 45 | (eval-when-compile (require 'cl-lib)) | ||
| 46 | |||
| 45 | ;;; User Functions: | 47 | ;;; User Functions: |
| 46 | 48 | ||
| 47 | ;;;###autoload | 49 | ;;;###autoload |
| @@ -51,6 +53,8 @@ | |||
| 51 | (consp (cdr x)) (integerp (cadr x)) | 53 | (consp (cdr x)) (integerp (cadr x)) |
| 52 | (vectorp (cddr x)))) | 54 | (vectorp (cddr x)))) |
| 53 | 55 | ||
| 56 | (cl-deftype ring () '(satisfies ring-p)) | ||
| 57 | |||
| 54 | ;;;###autoload | 58 | ;;;###autoload |
| 55 | (defun make-ring (size) | 59 | (defun make-ring (size) |
| 56 | "Make a ring that can contain SIZE elements." | 60 | "Make a ring that can contain SIZE elements." |
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index 6ddd8de6e8d..b6f0f66e5b1 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el | |||
| @@ -458,11 +458,21 @@ TESTFN is used to compare elements, or `equal' if TESTFN is nil." | |||
| 458 | (cl-defmethod seq-uniq ((sequence list) &optional testfn) | 458 | (cl-defmethod seq-uniq ((sequence list) &optional testfn) |
| 459 | (let ((result nil)) | 459 | (let ((result nil)) |
| 460 | (if (not testfn) | 460 | (if (not testfn) |
| 461 | ;; Fast path. | 461 | ;; Fast path. If the list is long, use a hash table to speed |
| 462 | (while sequence | 462 | ;; things up even more. |
| 463 | (unless (member (car sequence) result) | 463 | (let ((l (length sequence))) |
| 464 | (push (car sequence) result)) | 464 | (if (> l 100) |
| 465 | (pop sequence)) | 465 | (let ((hash (make-hash-table :test #'equal :size l))) |
| 466 | (while sequence | ||
| 467 | (unless (gethash (car sequence) hash) | ||
| 468 | (setf (gethash (car sequence) hash) t) | ||
| 469 | (push (car sequence) result)) | ||
| 470 | (setq sequence (cdr sequence)))) | ||
| 471 | ;; Short list. | ||
| 472 | (while sequence | ||
| 473 | (unless (member (car sequence) result) | ||
| 474 | (push (car sequence) result)) | ||
| 475 | (pop sequence)))) | ||
| 466 | ;; Slower path. | 476 | ;; Slower path. |
| 467 | (while sequence | 477 | (while sequence |
| 468 | (unless (seq-find (lambda (elem) | 478 | (unless (seq-find (lambda (elem) |
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index b7083bfe7cc..bd7c3c82f97 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el | |||
| @@ -254,13 +254,9 @@ the string." | |||
| 254 | (unless (natnump length) | 254 | (unless (natnump length) |
| 255 | (signal 'wrong-type-argument (list 'natnump length))) | 255 | (signal 'wrong-type-argument (list 'natnump length))) |
| 256 | (let ((pad-length (- length (length string)))) | 256 | (let ((pad-length (- length (length string)))) |
| 257 | (if (< pad-length 0) | 257 | (cond ((<= pad-length 0) string) |
| 258 | string | 258 | (start (concat (make-string pad-length (or padding ?\s)) string)) |
| 259 | (concat (and start | 259 | (t (concat string (make-string pad-length (or padding ?\s))))))) |
| 260 | (make-string pad-length (or padding ?\s))) | ||
| 261 | string | ||
| 262 | (and (not start) | ||
| 263 | (make-string pad-length (or padding ?\s))))))) | ||
| 264 | 260 | ||
| 265 | (defun string-chop-newline (string) | 261 | (defun string-chop-newline (string) |
| 266 | "Remove the final newline (if any) from STRING." | 262 | "Remove the final newline (if any) from STRING." |
| @@ -471,6 +467,18 @@ be marked unmodified, effectively ignoring those changes." | |||
| 471 | (equal ,hash (buffer-hash))) | 467 | (equal ,hash (buffer-hash))) |
| 472 | (restore-buffer-modified-p nil)))))))) | 468 | (restore-buffer-modified-p nil)))))))) |
| 473 | 469 | ||
| 470 | (defun emacs-etc--hide-local-variables () | ||
| 471 | "Hide local variables. | ||
| 472 | Used by `emacs-authors-mode' and `emacs-news-mode'." | ||
| 473 | (narrow-to-region (point-min) | ||
| 474 | (save-excursion | ||
| 475 | (goto-char (point-max)) | ||
| 476 | ;; Obfuscate to avoid this being interpreted | ||
| 477 | ;; as a local variable section itself. | ||
| 478 | (if (re-search-backward "^Local\sVariables:$" nil t) | ||
| 479 | (progn (forward-line -1) (point)) | ||
| 480 | (point-max))))) | ||
| 481 | |||
| 474 | (provide 'subr-x) | 482 | (provide 'subr-x) |
| 475 | 483 | ||
| 476 | ;;; subr-x.el ends here | 484 | ;;; subr-x.el ends here |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index d1634c64ad3..d1c8b5ff2dd 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> | 8 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
| 9 | ;; Keywords: emulations | 9 | ;; Keywords: emulations |
| 10 | ;; Version: 3.14.1 | 10 | ;; Version: 3.14.2 |
| 11 | 11 | ||
| 12 | ;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this | 12 | ;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this |
| 13 | ;; file on 20/3/2008, and the maintainer agreed that when a bug is | 13 | ;; file on 20/3/2008, and the maintainer agreed that when a bug is |
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 5d3aaf7c81c..9ad218d5988 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el | |||
| @@ -206,7 +206,7 @@ file named by `eshell-aliases-file'.") | |||
| 206 | (let ((eshell-current-handles | 206 | (let ((eshell-current-handles |
| 207 | (eshell-create-handles eshell-aliases-file 'overwrite))) | 207 | (eshell-create-handles eshell-aliases-file 'overwrite))) |
| 208 | (eshell/alias) | 208 | (eshell/alias) |
| 209 | (eshell-close-handles 0)))) | 209 | (eshell-close-handles 0 'nil)))) |
| 210 | 210 | ||
| 211 | (defsubst eshell-lookup-alias (name) | 211 | (defsubst eshell-lookup-alias (name) |
| 212 | "Check whether NAME is aliased. Return the alias if there is one." | 212 | "Check whether NAME is aliased. Return the alias if there is one." |
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 775e4c1057e..62c95056fd2 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -133,6 +133,10 @@ There are several different kinds of commands, however." | |||
| 133 | Such arguments will be passed to `read', and then evaluated." | 133 | Such arguments will be passed to `read', and then evaluated." |
| 134 | :type 'regexp) | 134 | :type 'regexp) |
| 135 | 135 | ||
| 136 | (defcustom eshell-lisp-form-nil-is-failure t | ||
| 137 | "If non-nil, Lisp forms like (COMMAND ARGS) treat a nil result as failure." | ||
| 138 | :type 'boolean) | ||
| 139 | |||
| 136 | (defcustom eshell-pre-command-hook nil | 140 | (defcustom eshell-pre-command-hook nil |
| 137 | "A hook run before each interactive command is invoked." | 141 | "A hook run before each interactive command is invoked." |
| 138 | :type 'hook) | 142 | :type 'hook) |
| @@ -541,9 +545,7 @@ implemented via rewriting, rather than as a function." | |||
| 541 | ,(eshell-invokify-arg body t))) | 545 | ,(eshell-invokify-arg body t))) |
| 542 | (setcar for-items (cadr for-items)) | 546 | (setcar for-items (cadr for-items)) |
| 543 | (setcdr for-items (cddr for-items))) | 547 | (setcdr for-items (cddr for-items))) |
| 544 | (eshell-close-handles | 548 | (eshell-close-handles))))) |
| 545 | eshell-last-command-status | ||
| 546 | (list 'quote eshell-last-command-result)))))) | ||
| 547 | 549 | ||
| 548 | (defun eshell-structure-basic-command (func names keyword test body | 550 | (defun eshell-structure-basic-command (func names keyword test body |
| 549 | &optional else) | 551 | &optional else) |
| @@ -551,10 +553,11 @@ implemented via rewriting, rather than as a function." | |||
| 551 | The first of NAMES should be the positive form, and the second the | 553 | The first of NAMES should be the positive form, and the second the |
| 552 | negative. It's not likely that users should ever need to call this | 554 | negative. It's not likely that users should ever need to call this |
| 553 | function." | 555 | function." |
| 554 | ;; If the test form begins with `eshell-convert', it means | 556 | ;; If the test form begins with `eshell-convert' or |
| 555 | ;; something data-wise will be returned, and we should let | 557 | ;; `eshell-escape-arg', it means something data-wise will be |
| 556 | ;; that determine the truth of the statement. | 558 | ;; returned, and we should let that determine the truth of the |
| 557 | (unless (eq (car test) 'eshell-convert) | 559 | ;; statement. |
| 560 | (unless (memq (car test) '(eshell-convert eshell-escape-arg)) | ||
| 558 | (setq test | 561 | (setq test |
| 559 | `(progn ,test | 562 | `(progn ,test |
| 560 | (eshell-exit-success-p)))) | 563 | (eshell-exit-success-p)))) |
| @@ -574,9 +577,7 @@ function." | |||
| 574 | `(let ((eshell-command-body '(nil)) | 577 | `(let ((eshell-command-body '(nil)) |
| 575 | (eshell-test-body '(nil))) | 578 | (eshell-test-body '(nil))) |
| 576 | (,func ,test ,body ,else) | 579 | (,func ,test ,body ,else) |
| 577 | (eshell-close-handles | 580 | (eshell-close-handles))) |
| 578 | eshell-last-command-status | ||
| 579 | (list 'quote eshell-last-command-result)))) | ||
| 580 | 581 | ||
| 581 | (defun eshell-rewrite-while-command (terms) | 582 | (defun eshell-rewrite-while-command (terms) |
| 582 | "Rewrite a `while' command into its equivalent Eshell command form. | 583 | "Rewrite a `while' command into its equivalent Eshell command form. |
| @@ -1415,43 +1416,53 @@ via `eshell-errorn'." | |||
| 1415 | (defun eshell-lisp-command (object &optional args) | 1416 | (defun eshell-lisp-command (object &optional args) |
| 1416 | "Insert Lisp OBJECT, using ARGS if a function." | 1417 | "Insert Lisp OBJECT, using ARGS if a function." |
| 1417 | (catch 'eshell-external ; deferred to an external command | 1418 | (catch 'eshell-external ; deferred to an external command |
| 1419 | (setq eshell-last-command-status 0 | ||
| 1420 | eshell-last-arguments args) | ||
| 1418 | (let* ((eshell-ensure-newline-p (eshell-interactive-output-p)) | 1421 | (let* ((eshell-ensure-newline-p (eshell-interactive-output-p)) |
| 1422 | (command-form-p (functionp object)) | ||
| 1419 | (result | 1423 | (result |
| 1420 | (if (functionp object) | 1424 | (if command-form-p |
| 1421 | (progn | 1425 | (let ((numeric (not (get object |
| 1422 | (setq eshell-last-arguments args | 1426 | 'eshell-no-numeric-conversions))) |
| 1423 | eshell-last-command-name | 1427 | (fname-args (get object 'eshell-filename-arguments))) |
| 1428 | (when (or numeric fname-args) | ||
| 1429 | (while args | ||
| 1430 | (let ((arg (car args))) | ||
| 1431 | (cond | ||
| 1432 | ((and numeric (stringp arg) (> (length arg) 0) | ||
| 1433 | (text-property-any 0 (length arg) | ||
| 1434 | 'number t arg)) | ||
| 1435 | ;; If any of the arguments are flagged as | ||
| 1436 | ;; numbers waiting for conversion, convert | ||
| 1437 | ;; them now. | ||
| 1438 | (setcar args (string-to-number arg))) | ||
| 1439 | ((and fname-args (stringp arg) | ||
| 1440 | (string-equal arg "~")) | ||
| 1441 | ;; If any of the arguments match "~", | ||
| 1442 | ;; prepend "./" to treat it as a regular | ||
| 1443 | ;; file name. | ||
| 1444 | (setcar args (concat "./" arg))))) | ||
| 1445 | (setq args (cdr args)))) | ||
| 1446 | (setq eshell-last-command-name | ||
| 1424 | (concat "#<function " (symbol-name object) ">")) | 1447 | (concat "#<function " (symbol-name object) ">")) |
| 1425 | (let ((numeric (not (get object | ||
| 1426 | 'eshell-no-numeric-conversions))) | ||
| 1427 | (fname-args (get object 'eshell-filename-arguments))) | ||
| 1428 | (when (or numeric fname-args) | ||
| 1429 | (while args | ||
| 1430 | (let ((arg (car args))) | ||
| 1431 | (cond ((and numeric (stringp arg) (> (length arg) 0) | ||
| 1432 | (text-property-any 0 (length arg) | ||
| 1433 | 'number t arg)) | ||
| 1434 | ;; If any of the arguments are | ||
| 1435 | ;; flagged as numbers waiting for | ||
| 1436 | ;; conversion, convert them now. | ||
| 1437 | (setcar args (string-to-number arg))) | ||
| 1438 | ((and fname-args (stringp arg) | ||
| 1439 | (string-equal arg "~")) | ||
| 1440 | ;; If any of the arguments match "~", | ||
| 1441 | ;; prepend "./" to treat it as a | ||
| 1442 | ;; regular file name. | ||
| 1443 | (setcar args (concat "./" arg))))) | ||
| 1444 | (setq args (cdr args))))) | ||
| 1445 | (eshell-apply object eshell-last-arguments)) | 1448 | (eshell-apply object eshell-last-arguments)) |
| 1446 | (setq eshell-last-arguments args | 1449 | (setq eshell-last-command-name "#<Lisp object>") |
| 1447 | eshell-last-command-name "#<Lisp object>") | ||
| 1448 | (eshell-eval object)))) | 1450 | (eshell-eval object)))) |
| 1449 | (if (and eshell-ensure-newline-p | 1451 | (if (and eshell-ensure-newline-p |
| 1450 | (save-excursion | 1452 | (save-excursion |
| 1451 | (goto-char eshell-last-output-end) | 1453 | (goto-char eshell-last-output-end) |
| 1452 | (not (bolp)))) | 1454 | (not (bolp)))) |
| 1453 | (eshell-print "\n")) | 1455 | (eshell-print "\n")) |
| 1454 | (eshell-close-handles 0 (list 'quote result))))) | 1456 | (eshell-close-handles |
| 1457 | ;; If `eshell-lisp-form-nil-is-failure' is non-nil, Lisp forms | ||
| 1458 | ;; that succeeded but have a nil result should have an exit | ||
| 1459 | ;; status of 2. | ||
| 1460 | (when (and eshell-lisp-form-nil-is-failure | ||
| 1461 | (not command-form-p) | ||
| 1462 | (= eshell-last-command-status 0) | ||
| 1463 | (not result)) | ||
| 1464 | 2) | ||
| 1465 | (list 'quote result))))) | ||
| 1455 | 1466 | ||
| 1456 | (defalias 'eshell-lisp-command* #'eshell-lisp-command) | 1467 | (defalias 'eshell-lisp-command* #'eshell-lisp-command) |
| 1457 | 1468 | ||
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 68e52a2c9c8..27703976f6d 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el | |||
| @@ -254,6 +254,30 @@ a nil value of mode defaults to `insert'." | |||
| 254 | (setq idx (1+ idx)))) | 254 | (setq idx (1+ idx)))) |
| 255 | handles) | 255 | handles) |
| 256 | 256 | ||
| 257 | (defun eshell-close-handles (&optional exit-code result handles) | ||
| 258 | "Close all of the current HANDLES, taking refcounts into account. | ||
| 259 | If HANDLES is nil, use `eshell-current-handles'. | ||
| 260 | |||
| 261 | EXIT-CODE is the process exit code (zero, if the command | ||
| 262 | completed successfully). If nil, then use the exit code already | ||
| 263 | set in `eshell-last-command-status'. | ||
| 264 | |||
| 265 | RESULT is the quoted value of the last command. If nil, then use | ||
| 266 | the value already set in `eshell-last-command-result'." | ||
| 267 | (when exit-code | ||
| 268 | (setq eshell-last-command-status exit-code)) | ||
| 269 | (when result | ||
| 270 | (cl-assert (eq (car result) 'quote)) | ||
| 271 | (setq eshell-last-command-result (cadr result))) | ||
| 272 | (let ((handles (or handles eshell-current-handles))) | ||
| 273 | (dotimes (idx eshell-number-of-handles) | ||
| 274 | (when-let ((handle (aref handles idx))) | ||
| 275 | (setcdr handle (1- (cdr handle))) | ||
| 276 | (when (= (cdr handle) 0) | ||
| 277 | (dolist (target (ensure-list (car (aref handles idx)))) | ||
| 278 | (eshell-close-target target (= eshell-last-command-status 0))) | ||
| 279 | (setcar handle nil)))))) | ||
| 280 | |||
| 257 | (defun eshell-close-target (target status) | 281 | (defun eshell-close-target (target status) |
| 258 | "Close an output TARGET, passing STATUS as the result. | 282 | "Close an output TARGET, passing STATUS as the result. |
| 259 | STATUS should be non-nil on successful termination of the output." | 283 | STATUS should be non-nil on successful termination of the output." |
| @@ -305,32 +329,6 @@ STATUS should be non-nil on successful termination of the output." | |||
| 305 | ((consp target) | 329 | ((consp target) |
| 306 | (apply (car target) status (cdr target))))) | 330 | (apply (car target) status (cdr target))))) |
| 307 | 331 | ||
| 308 | (defun eshell-close-handles (exit-code &optional result handles) | ||
| 309 | "Close all of the current handles, taking refcounts into account. | ||
| 310 | EXIT-CODE is the process exit code; mainly, it is zero, if the command | ||
| 311 | completed successfully. RESULT is the quoted value of the last | ||
| 312 | command. If nil, then the meta variables for keeping track of the | ||
| 313 | last execution result should not be changed." | ||
| 314 | (let ((idx 0)) | ||
| 315 | (cl-assert (or (not result) (eq (car result) 'quote))) | ||
| 316 | (setq eshell-last-command-status exit-code | ||
| 317 | eshell-last-command-result (cadr result)) | ||
| 318 | (while (< idx eshell-number-of-handles) | ||
| 319 | (let ((handles (or handles eshell-current-handles))) | ||
| 320 | (when (aref handles idx) | ||
| 321 | (setcdr (aref handles idx) | ||
| 322 | (1- (cdr (aref handles idx)))) | ||
| 323 | (when (= (cdr (aref handles idx)) 0) | ||
| 324 | (let ((target (car (aref handles idx)))) | ||
| 325 | (if (not (listp target)) | ||
| 326 | (eshell-close-target target (= exit-code 0)) | ||
| 327 | (while target | ||
| 328 | (eshell-close-target (car target) (= exit-code 0)) | ||
| 329 | (setq target (cdr target))))) | ||
| 330 | (setcar (aref handles idx) nil)))) | ||
| 331 | (setq idx (1+ idx))) | ||
| 332 | nil)) | ||
| 333 | |||
| 334 | (defun eshell-kill-append (string) | 332 | (defun eshell-kill-append (string) |
| 335 | "Call `kill-append' with STRING, if it is indeed a string." | 333 | "Call `kill-append' with STRING, if it is indeed a string." |
| 336 | (if (stringp string) | 334 | (if (stringp string) |
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 99b43661f2c..c367b5cd643 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el | |||
| @@ -346,7 +346,9 @@ Used only on systems which do not support async subprocesses.") | |||
| 346 | (defvar eshell-last-output-end) ;Defined in esh-mode.el. | 346 | (defvar eshell-last-output-end) ;Defined in esh-mode.el. |
| 347 | (eshell-update-markers eshell-last-output-end) | 347 | (eshell-update-markers eshell-last-output-end) |
| 348 | ;; Simulate the effect of eshell-sentinel. | 348 | ;; Simulate the effect of eshell-sentinel. |
| 349 | (eshell-close-handles (if (numberp exit-status) exit-status -1)) | 349 | (eshell-close-handles |
| 350 | (if (numberp exit-status) exit-status -1) | ||
| 351 | (list 'quote (and (numberp exit-status) (= exit-status 0)))) | ||
| 350 | (eshell-kill-process-function command exit-status) | 352 | (eshell-kill-process-function command exit-status) |
| 351 | (or (bound-and-true-p eshell-in-pipeline-p) | 353 | (or (bound-and-true-p eshell-in-pipeline-p) |
| 352 | (setq eshell-last-sync-output-start nil)) | 354 | (setq eshell-last-sync-output-start nil)) |
| @@ -398,40 +400,36 @@ PROC is the process that's exiting. STRING is the exit message." | |||
| 398 | (when (buffer-live-p (process-buffer proc)) | 400 | (when (buffer-live-p (process-buffer proc)) |
| 399 | (with-current-buffer (process-buffer proc) | 401 | (with-current-buffer (process-buffer proc) |
| 400 | (unwind-protect | 402 | (unwind-protect |
| 401 | (let ((entry (assq proc eshell-process-list))) | 403 | (when-let ((entry (assq proc eshell-process-list))) |
| 402 | ; (if (not entry) | 404 | (unwind-protect |
| 403 | ; (error "Sentinel called for unowned process `%s'" | 405 | (unless (string= string "run") |
| 404 | ; (process-name proc)) | 406 | ;; Write the exit message if the status is |
| 405 | (when entry | 407 | ;; abnormal and the process is already writing |
| 406 | (unwind-protect | 408 | ;; to the terminal. |
| 407 | (progn | 409 | (when (and (eq proc (eshell-tail-process)) |
| 408 | (unless (string= string "run") | 410 | (not (string-match "^\\(finished\\|exited\\)" |
| 409 | ;; Write the exit message if the status is | 411 | string))) |
| 410 | ;; abnormal and the process is already writing | 412 | (funcall (process-filter proc) proc string)) |
| 411 | ;; to the terminal. | 413 | (let ((handles (nth 1 entry)) |
| 412 | (when (and (eq proc (eshell-tail-process)) | 414 | (str (prog1 (nth 3 entry) |
| 413 | (not (string-match "^\\(finished\\|exited\\)" | 415 | (setf (nth 3 entry) nil))) |
| 414 | string))) | 416 | (status (process-exit-status proc))) |
| 415 | (funcall (process-filter proc) proc string)) | 417 | ;; If we're in the middle of handling output |
| 416 | (let ((handles (nth 1 entry)) | 418 | ;; from this process then schedule the EOF for |
| 417 | (str (prog1 (nth 3 entry) | 419 | ;; later. |
| 418 | (setf (nth 3 entry) nil))) | 420 | (letrec ((finish-io |
| 419 | (status (process-exit-status proc))) | 421 | (lambda () |
| 420 | ;; If we're in the middle of handling output | 422 | (if (nth 4 entry) |
| 421 | ;; from this process then schedule the EOF for | 423 | (run-at-time 0 nil finish-io) |
| 422 | ;; later. | 424 | (when str |
| 423 | (letrec ((finish-io | 425 | (ignore-error 'eshell-pipe-broken |
| 424 | (lambda () | 426 | (eshell-output-object |
| 425 | (if (nth 4 entry) | 427 | str nil handles))) |
| 426 | (run-at-time 0 nil finish-io) | 428 | (eshell-close-handles |
| 427 | (when str | 429 | status (list 'quote (= status 0)) |
| 428 | (ignore-error 'eshell-pipe-broken | 430 | handles))))) |
| 429 | (eshell-output-object | 431 | (funcall finish-io)))) |
| 430 | str nil handles))) | 432 | (eshell-remove-process-entry entry))) |
| 431 | (eshell-close-handles | ||
| 432 | status 'nil handles))))) | ||
| 433 | (funcall finish-io))))) | ||
| 434 | (eshell-remove-process-entry entry)))) | ||
| 435 | (eshell-kill-process-function proc string))))) | 433 | (eshell-kill-process-function proc string))))) |
| 436 | 434 | ||
| 437 | (defun eshell-process-interact (func &optional all query) | 435 | (defun eshell-process-interact (func &optional all query) |
diff --git a/lisp/faces.el b/lisp/faces.el index c7acbf57587..390ddbf606a 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2046,18 +2046,29 @@ as backgrounds." | |||
| 2046 | (when msg (message "Color: `%s'" color)) | 2046 | (when msg (message "Color: `%s'" color)) |
| 2047 | color)) | 2047 | color)) |
| 2048 | 2048 | ||
| 2049 | (defun face-at-point (&optional thing multiple) | 2049 | (defun face-at-point (&optional text multiple) |
| 2050 | "Return the face of the character after point. | 2050 | "Return a face name from point in the current buffer. |
| 2051 | If it has more than one face, return the first one. | 2051 | This function is meant to be used as a conveniency function for |
| 2052 | If THING is non-nil try first to get a face name from the buffer. | 2052 | providing defaults when prompting the user for a face name. |
| 2053 | IF MULTIPLE is non-nil, return a list of all faces. | 2053 | |
| 2054 | Return nil if there is no face." | 2054 | If TEXT is non-nil, return the text at point if it names an |
| 2055 | existing face. | ||
| 2056 | |||
| 2057 | Otherwise, look at the faces in effect at point as text | ||
| 2058 | properties or overlay properties, and return one of these face | ||
| 2059 | names. | ||
| 2060 | |||
| 2061 | IF MULTIPLE is non-nil, return a list of faces. | ||
| 2062 | |||
| 2063 | Return nil if there is no face at point. | ||
| 2064 | |||
| 2065 | This function is not meant for handling faces programatically; to | ||
| 2066 | do that, use `get-text-property' and `get-char-property'." | ||
| 2055 | (let (faces) | 2067 | (let (faces) |
| 2056 | (if thing | 2068 | (when text |
| 2057 | ;; Try to get a face name from the buffer. | 2069 | ;; Try to get a face name from the buffer. |
| 2058 | (let ((face (intern-soft (thing-at-point 'symbol)))) | 2070 | (when-let ((face (thing-at-point 'face))) |
| 2059 | (if (facep face) | 2071 | (push face faces))) |
| 2060 | (push face faces)))) | ||
| 2061 | ;; Add the named faces that the `read-face-name' or `face' property uses. | 2072 | ;; Add the named faces that the `read-face-name' or `face' property uses. |
| 2062 | (let ((faceprop (or (get-char-property (point) 'read-face-name) | 2073 | (let ((faceprop (or (get-char-property (point) 'read-face-name) |
| 2063 | (get-char-property (point) 'face)))) | 2074 | (get-char-property (point) 'face)))) |
diff --git a/lisp/finder.el b/lisp/finder.el index 73072c0cd48..08d20963b46 100644 --- a/lisp/finder.el +++ b/lisp/finder.el | |||
| @@ -77,6 +77,7 @@ Each element has the form (KEYWORD . DESCRIPTION).") | |||
| 77 | 77 | ||
| 78 | (defvar-keymap finder-mode-map | 78 | (defvar-keymap finder-mode-map |
| 79 | :doc "Keymap used in `finder-mode'." | 79 | :doc "Keymap used in `finder-mode'." |
| 80 | :parent special-mode-map | ||
| 80 | "SPC" #'finder-select | 81 | "SPC" #'finder-select |
| 81 | "f" #'finder-select | 82 | "f" #'finder-select |
| 82 | "<follow-link>" 'mouse-face | 83 | "<follow-link>" 'mouse-face |
| @@ -420,15 +421,14 @@ FILE should be in a form suitable for passing to `locate-library'." | |||
| 420 | (interactive) | 421 | (interactive) |
| 421 | (finder-list-keywords)) | 422 | (finder-list-keywords)) |
| 422 | 423 | ||
| 423 | (define-derived-mode finder-mode nil "Finder" | 424 | (define-derived-mode finder-mode special-mode "Finder" |
| 424 | "Major mode for browsing package documentation. | 425 | "Major mode for browsing package documentation. |
| 425 | \\<finder-mode-map> | 426 | \\<finder-mode-map> |
| 426 | \\[finder-select] more help for the item on the current line | 427 | \\[finder-select] more help for the item on the current line |
| 427 | \\[finder-exit] exit Finder mode and kill the Finder buffer." | 428 | \\[finder-exit] exit Finder mode and kill the Finder buffer. |
| 428 | :syntax-table finder-mode-syntax-table | 429 | |
| 430 | \\{finder-mode-map}" | ||
| 429 | :interactive nil | 431 | :interactive nil |
| 430 | (setq buffer-read-only t | ||
| 431 | buffer-undo-list t) | ||
| 432 | (setq-local finder-headmark nil)) | 432 | (setq-local finder-headmark nil)) |
| 433 | 433 | ||
| 434 | (defun finder-summary () | 434 | (defun finder-summary () |
| @@ -436,9 +436,9 @@ FILE should be in a form suitable for passing to `locate-library'." | |||
| 436 | (interactive nil finder-mode) | 436 | (interactive nil finder-mode) |
| 437 | (message "%s" | 437 | (message "%s" |
| 438 | (substitute-command-keys | 438 | (substitute-command-keys |
| 439 | "\\<finder-mode-map>\\[finder-select] = select, \ | 439 | "\\<finder-mode-map>\\[finder-select] select, \ |
| 440 | \\[finder-mouse-select] = select, \\[finder-list-keywords] = to \ | 440 | \\[finder-mouse-select] select, \\[finder-list-keywords] go to \ |
| 441 | finder directory, \\[finder-exit] = quit, \\[finder-summary] = help"))) | 441 | finder directory, \\[finder-exit] quit, \\[finder-summary] help"))) |
| 442 | 442 | ||
| 443 | (defun finder-exit () | 443 | (defun finder-exit () |
| 444 | "Exit Finder mode. | 444 | "Exit Finder mode. |
diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 732c6062b8b..41fc2d83ac3 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el | |||
| @@ -223,6 +223,7 @@ | |||
| 223 | 223 | ||
| 224 | (defconst gnus-outlook-deuglify-version "1.5 Gnus version" | 224 | (defconst gnus-outlook-deuglify-version "1.5 Gnus version" |
| 225 | "Version of gnus-outlook-deuglify.") | 225 | "Version of gnus-outlook-deuglify.") |
| 226 | (make-obsolete-variable 'gnus-outlook-deuglify-version 'emacs-version "29.1") | ||
| 226 | 227 | ||
| 227 | ;;; User Customizable Variables: | 228 | ;;; User Customizable Variables: |
| 228 | 229 | ||
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el index cd2b53064b9..6028d4fcb2f 100644 --- a/lisp/gnus/gnus-diary.el +++ b/lisp/gnus/gnus-diary.el | |||
| @@ -65,8 +65,9 @@ There are currently two built-in format functions: | |||
| 65 | (const :tag "french" gnus-diary-delay-format-french) | 65 | (const :tag "french" gnus-diary-delay-format-french) |
| 66 | (symbol :tag "other"))) | 66 | (symbol :tag "other"))) |
| 67 | 67 | ||
| 68 | (defconst gnus-diary-version nndiary-version | 68 | (defconst gnus-diary-version "0.2-b14" |
| 69 | "Current Diary back end version.") | 69 | "Current Diary back end version.") |
| 70 | (make-obsolete-variable 'gnus-diary-version 'emacs-version "29.1") | ||
| 70 | 71 | ||
| 71 | 72 | ||
| 72 | ;; Compatibility functions ================================================== | 73 | ;; Compatibility functions ================================================== |
| @@ -377,8 +378,9 @@ If ARG (or prefix) is non-nil, force prompting for all fields." | |||
| 377 | 378 | ||
| 378 | (defun gnus-diary-version () | 379 | (defun gnus-diary-version () |
| 379 | "Current Diary back end version." | 380 | "Current Diary back end version." |
| 381 | (declare (obsolete emacs-version "29.1")) | ||
| 380 | (interactive) | 382 | (interactive) |
| 381 | (message "NNDiary version %s" nndiary-version)) | 383 | (message "NNDiary version %s" gnus-diary-version)) |
| 382 | 384 | ||
| 383 | (provide 'gnus-diary) | 385 | (provide 'gnus-diary) |
| 384 | 386 | ||
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index d1ad5bd7b2d..4c93814e0dc 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -40,17 +40,14 @@ | |||
| 40 | 40 | ||
| 41 | (defcustom gnus-completing-read-function 'gnus-emacs-completing-read | 41 | (defcustom gnus-completing-read-function 'gnus-emacs-completing-read |
| 42 | "Function use to do completing read." | 42 | "Function use to do completing read." |
| 43 | :version "24.1" | 43 | :version "29.1" |
| 44 | :group 'gnus-meta | 44 | :group 'gnus-meta |
| 45 | :type '(radio (function-item | 45 | :type '(radio (function-item |
| 46 | :doc "Use Emacs standard `completing-read' function." | 46 | :doc "Use Emacs standard `completing-read' function." |
| 47 | gnus-emacs-completing-read) | 47 | gnus-emacs-completing-read) |
| 48 | (function-item | 48 | (function-item |
| 49 | :doc "Use `ido-completing-read' function." | 49 | :doc "Use `ido-completing-read' function." |
| 50 | gnus-ido-completing-read) | 50 | gnus-ido-completing-read))) |
| 51 | (function-item | ||
| 52 | :doc "Use iswitchb based completing-read function." | ||
| 53 | gnus-iswitchb-completing-read))) | ||
| 54 | 51 | ||
| 55 | (defcustom gnus-completion-styles | 52 | (defcustom gnus-completion-styles |
| 56 | (append (when (and (assq 'substring completion-styles-alist) | 53 | (append (when (and (assq 'substring completion-styles-alist) |
| @@ -1202,6 +1199,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and', | |||
| 1202 | (defun gnus-iswitchb-completing-read (prompt collection &optional require-match | 1199 | (defun gnus-iswitchb-completing-read (prompt collection &optional require-match |
| 1203 | initial-input history def) | 1200 | initial-input history def) |
| 1204 | "`iswitchb' based completing-read function." | 1201 | "`iswitchb' based completing-read function." |
| 1202 | (declare (obsolete nil "29.1")) | ||
| 1205 | ;; Make sure iswitchb is loaded before we let-bind its variables. | 1203 | ;; Make sure iswitchb is loaded before we let-bind its variables. |
| 1206 | ;; If it is loaded inside the let, variables can become unbound afterwards. | 1204 | ;; If it is loaded inside the let, variables can become unbound afterwards. |
| 1207 | (require 'iswitchb) | 1205 | (require 'iswitchb) |
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index 6990d8ee778..ee6cab365f3 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el | |||
| @@ -260,9 +260,10 @@ Default is t." | |||
| 260 | "Non-nil means that files will be viewed with metamail. | 260 | "Non-nil means that files will be viewed with metamail. |
| 261 | The gnus-uu viewing functions will be ignored and gnus-uu will try | 261 | The gnus-uu viewing functions will be ignored and gnus-uu will try |
| 262 | to guess at a content-type based on file name suffixes. Default | 262 | to guess at a content-type based on file name suffixes. Default |
| 263 | it nil." | 263 | is nil." |
| 264 | :group 'gnus-extract | 264 | :group 'gnus-extract |
| 265 | :type 'boolean) | 265 | :type 'boolean) |
| 266 | (make-obsolete-variable 'gnus-uu-view-with-metamail "don't use it." "29.1") | ||
| 266 | 267 | ||
| 267 | (defcustom gnus-uu-unmark-articles-not-decoded nil | 268 | (defcustom gnus-uu-unmark-articles-not-decoded nil |
| 268 | "If non-nil, gnus-uu will mark unsuccessfully decoded articles as unread. | 269 | "If non-nil, gnus-uu will mark unsuccessfully decoded articles as unread. |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index b036978efa8..0afd873a5df 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -4166,8 +4166,7 @@ prompt the user for the name of an NNTP server to use." | |||
| 4166 | ;; file. | 4166 | ;; file. |
| 4167 | (unless (string-match "^Gnus" gnus-version) | 4167 | (unless (string-match "^Gnus" gnus-version) |
| 4168 | (load "gnus-load" nil t)) | 4168 | (load "gnus-load" nil t)) |
| 4169 | (unless (or (byte-code-function-p (symbol-function 'gnus)) | 4169 | (unless (compiled-function-p (symbol-function 'gnus)) |
| 4170 | (subr-native-elisp-p (symbol-function 'gnus))) | ||
| 4171 | (message "You should compile Gnus") | 4170 | (message "You should compile Gnus") |
| 4172 | (sit-for 2)) | 4171 | (sit-for 2)) |
| 4173 | (let ((gnus-action-message-log (list nil))) | 4172 | (let ((gnus-action-message-log (list nil))) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 00a27fb5f51..8a3967f3461 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -2086,6 +2086,7 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'." | |||
| 2086 | 2086 | ||
| 2087 | (defun message-mark-active-p () | 2087 | (defun message-mark-active-p () |
| 2088 | "Non-nil means the mark and region are currently active in this buffer." | 2088 | "Non-nil means the mark and region are currently active in this buffer." |
| 2089 | (declare (obsolete mark-active "29.1")) | ||
| 2089 | mark-active) | 2090 | mark-active) |
| 2090 | 2091 | ||
| 2091 | (defun message-unquote-tokens (elems) | 2092 | (defun message-unquote-tokens (elems) |
| @@ -2953,12 +2954,12 @@ Consider adding this function to `message-header-setup-hook'" | |||
| 2953 | ["Fill Yanked Message" message-fill-yanked-message t] | 2954 | ["Fill Yanked Message" message-fill-yanked-message t] |
| 2954 | ["Insert Signature" message-insert-signature t] | 2955 | ["Insert Signature" message-insert-signature t] |
| 2955 | ["Caesar (rot13) Message" message-caesar-buffer-body t] | 2956 | ["Caesar (rot13) Message" message-caesar-buffer-body t] |
| 2956 | ["Caesar (rot13) Region" message-caesar-region (message-mark-active-p)] | 2957 | ["Caesar (rot13) Region" message-caesar-region mark-active] |
| 2957 | ["Elide Region" message-elide-region | 2958 | ["Elide Region" message-elide-region |
| 2958 | :active (message-mark-active-p) | 2959 | :active mark-active |
| 2959 | :help "Replace text in region with an ellipsis"] | 2960 | :help "Replace text in region with an ellipsis"] |
| 2960 | ["Delete Outside Region" message-delete-not-region | 2961 | ["Delete Outside Region" message-delete-not-region |
| 2961 | :active (message-mark-active-p) | 2962 | :active mark-active |
| 2962 | :help "Delete all quoted text outside region"] | 2963 | :help "Delete all quoted text outside region"] |
| 2963 | ["Kill To Signature" message-kill-to-signature t] | 2964 | ["Kill To Signature" message-kill-to-signature t] |
| 2964 | ["Newline and Reformat" message-newline-and-reformat t] | 2965 | ["Newline and Reformat" message-newline-and-reformat t] |
| @@ -2966,7 +2967,7 @@ Consider adding this function to `message-header-setup-hook'" | |||
| 2966 | ["Spellcheck" ispell-message :help "Spellcheck this message"] | 2967 | ["Spellcheck" ispell-message :help "Spellcheck this message"] |
| 2967 | "----" | 2968 | "----" |
| 2968 | ["Insert Region Marked" message-mark-inserted-region | 2969 | ["Insert Region Marked" message-mark-inserted-region |
| 2969 | :active (message-mark-active-p) :help "Mark region with enclosing tags"] | 2970 | :active mark-active :help "Mark region with enclosing tags"] |
| 2970 | ["Insert File Marked..." message-mark-insert-file | 2971 | ["Insert File Marked..." message-mark-insert-file |
| 2971 | :help "Insert file at point marked with enclosing tags"] | 2972 | :help "Insert file at point marked with enclosing tags"] |
| 2972 | ["Attach File..." mml-attach-file t] | 2973 | ["Attach File..." mml-attach-file t] |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 79217d34001..1417ecdccc8 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el | |||
| @@ -117,8 +117,7 @@ | |||
| 117 | (cond ((fboundp 'libxml-parse-html-region) 'shr) | 117 | (cond ((fboundp 'libxml-parse-html-region) 'shr) |
| 118 | ((executable-find "w3m") 'gnus-w3m) | 118 | ((executable-find "w3m") 'gnus-w3m) |
| 119 | ((executable-find "links") 'links) | 119 | ((executable-find "links") 'links) |
| 120 | ((executable-find "lynx") 'lynx) | 120 | ((executable-find "lynx") 'lynx)) |
| 121 | ((locate-library "html2text") 'html2text)) | ||
| 122 | "Render of HTML contents. | 121 | "Render of HTML contents. |
| 123 | It is one of defined renderer types, or a rendering function. | 122 | It is one of defined renderer types, or a rendering function. |
| 124 | The defined renderer types are: | 123 | The defined renderer types are: |
| @@ -127,16 +126,14 @@ The defined renderer types are: | |||
| 127 | `w3m': use emacs-w3m; | 126 | `w3m': use emacs-w3m; |
| 128 | `w3m-standalone': use plain w3m; | 127 | `w3m-standalone': use plain w3m; |
| 129 | `links': use links; | 128 | `links': use links; |
| 130 | `lynx': use lynx; | 129 | `lynx': use lynx." |
| 131 | `html2text': use html2text." | 130 | :version "29.1" |
| 132 | :version "27.1" | ||
| 133 | :type '(choice (const shr) | 131 | :type '(choice (const shr) |
| 134 | (const gnus-w3m) | 132 | (const gnus-w3m) |
| 135 | (const w3m :tag "emacs-w3m") | 133 | (const w3m :tag "emacs-w3m") |
| 136 | (const w3m-standalone :tag "standalone w3m" ) | 134 | (const w3m-standalone :tag "standalone w3m" ) |
| 137 | (const links) | 135 | (const links) |
| 138 | (const lynx) | 136 | (const lynx) |
| 139 | (const html2text) | ||
| 140 | (function)) | 137 | (function)) |
| 141 | :group 'mime-display) | 138 | :group 'mime-display) |
| 142 | 139 | ||
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 5cd57d2f801..e8291cfe6f7 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -35,7 +35,6 @@ | |||
| 35 | (declare-function gnus-setup-posting-charset "gnus-msg" (group)) | 35 | (declare-function gnus-setup-posting-charset "gnus-msg" (group)) |
| 36 | (autoload 'gnus-completing-read "gnus-util") | 36 | (autoload 'gnus-completing-read "gnus-util") |
| 37 | (autoload 'message-fetch-field "message") | 37 | (autoload 'message-fetch-field "message") |
| 38 | (autoload 'message-mark-active-p "message") | ||
| 39 | (autoload 'message-info "message") | 38 | (autoload 'message-info "message") |
| 40 | (autoload 'fill-flowed-encode "flow-fill") | 39 | (autoload 'fill-flowed-encode "flow-fill") |
| 41 | (autoload 'message-posting-charset "message") | 40 | (autoload 'message-posting-charset "message") |
| @@ -1236,7 +1235,7 @@ If HANDLES is non-nil, use it instead reparsing the buffer." | |||
| 1236 | ;; | 1235 | ;; |
| 1237 | ;;["Narrow" mml-narrow-to-part t] | 1236 | ;;["Narrow" mml-narrow-to-part t] |
| 1238 | ["Quote MML in region" mml-quote-region | 1237 | ["Quote MML in region" mml-quote-region |
| 1239 | :active (message-mark-active-p) | 1238 | :active mark-active |
| 1240 | :help "Quote MML tags in region"] | 1239 | :help "Quote MML tags in region"] |
| 1241 | ["Validate MML" mml-validate t] | 1240 | ["Validate MML" mml-validate t] |
| 1242 | ["Preview" mml-preview t] | 1241 | ["Preview" mml-preview t] |
diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el index 60140a46411..d7e32e45809 100644 --- a/lisp/gnus/nnagent.el +++ b/lisp/gnus/nnagent.el | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | (defconst nnagent-version "nnagent 1.0") | 37 | (defconst nnagent-version "nnagent 1.0") |
| 38 | (make-obsolete-variable 'nnagent-version 'emacs-version "29.1") | ||
| 38 | 39 | ||
| 39 | (defvoo nnagent-directory nil | 40 | (defvoo nnagent-directory nil |
| 40 | "Internal variable." | 41 | "Internal variable." |
diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index ff0dea8ecdd..5f9903a5b06 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | 55 | ||
| 56 | (defconst nnbabyl-version "nnbabyl 1.0" | 56 | (defconst nnbabyl-version "nnbabyl 1.0" |
| 57 | "nnbabyl version.") | 57 | "nnbabyl version.") |
| 58 | (make-obsolete-variable 'nnbabyl-version 'emacs-version "29.1") | ||
| 58 | 59 | ||
| 59 | (defvoo nnbabyl-mbox-buffer nil) | 60 | (defvoo nnbabyl-mbox-buffer nil) |
| 60 | (defvoo nnbabyl-current-group nil) | 61 | (defvoo nnbabyl-current-group nil) |
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index bd60c43f59d..14540ac7e87 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el | |||
| @@ -234,9 +234,11 @@ all. This may very well take some time.") | |||
| 234 | 234 | ||
| 235 | (defconst nndiary-version "0.2-b14" | 235 | (defconst nndiary-version "0.2-b14" |
| 236 | "Current Diary back end version.") | 236 | "Current Diary back end version.") |
| 237 | (make-obsolete-variable 'nndiary-version 'emacs-version "29.1") | ||
| 237 | 238 | ||
| 238 | (defun nndiary-version () | 239 | (defun nndiary-version () |
| 239 | "Current Diary back end version." | 240 | "Current Diary back end version." |
| 241 | (declare (obsolete emacs-version "29.1")) | ||
| 240 | (interactive) | 242 | (interactive) |
| 241 | (message "NNDiary version %s" nndiary-version)) | 243 | (message "NNDiary version %s" nndiary-version)) |
| 242 | 244 | ||
diff --git a/lisp/gnus/nndir.el b/lisp/gnus/nndir.el index 2ca25534ce1..75a6ace107a 100644 --- a/lisp/gnus/nndir.el +++ b/lisp/gnus/nndir.el | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | (defvoo nndir-status-string "" nil nnmh-status-string) | 49 | (defvoo nndir-status-string "" nil nnmh-status-string) |
| 50 | (defconst nndir-version "nndir 1.0") | 50 | (defconst nndir-version "nndir 1.0") |
| 51 | (make-obsolete-variable 'nndir-version 'emacs-version "29.1") | ||
| 51 | 52 | ||
| 52 | 53 | ||
| 53 | 54 | ||
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 19ccce47b50..cdff7c9accf 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el | |||
| @@ -218,6 +218,7 @@ from the document.") | |||
| 218 | 218 | ||
| 219 | (defconst nndoc-version "nndoc 1.0" | 219 | (defconst nndoc-version "nndoc 1.0" |
| 220 | "nndoc version.") | 220 | "nndoc version.") |
| 221 | (make-obsolete-variable 'nndoc-version 'emacs-version "29.1") | ||
| 221 | 222 | ||
| 222 | 223 | ||
| 223 | 224 | ||
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index fa88b8a87e0..f21e4faf559 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el | |||
| @@ -56,6 +56,7 @@ are generated if and only if they are also in `message-draft-headers'." | |||
| 56 | (defvoo nndraft-current-directory nil nil nnmh-current-directory) | 56 | (defvoo nndraft-current-directory nil nil nnmh-current-directory) |
| 57 | 57 | ||
| 58 | (defconst nndraft-version "nndraft 1.0") | 58 | (defconst nndraft-version "nndraft 1.0") |
| 59 | (make-obsolete-variable 'nndraft-version 'emacs-version "29.1") | ||
| 59 | (defvoo nndraft-status-string "" nil nnmh-status-string) | 60 | (defvoo nndraft-status-string "" nil nnmh-status-string) |
| 60 | 61 | ||
| 61 | 62 | ||
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el index 0c565a8230c..ff72842a2ee 100644 --- a/lisp/gnus/nneething.el +++ b/lisp/gnus/nneething.el | |||
| @@ -57,6 +57,7 @@ included.") | |||
| 57 | 57 | ||
| 58 | (defconst nneething-version "nneething 1.0" | 58 | (defconst nneething-version "nneething 1.0" |
| 59 | "nneething version.") | 59 | "nneething version.") |
| 60 | (make-obsolete-variable 'nneething-version 'emacs-version "29.1") | ||
| 60 | 61 | ||
| 61 | (defvoo nneething-current-directory nil | 62 | (defvoo nneething-current-directory nil |
| 62 | "Current news group directory.") | 63 | "Current news group directory.") |
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index c3f7073a7b8..a2b461c15f0 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el | |||
| @@ -91,6 +91,7 @@ message, a huge time saver for large mailboxes.") | |||
| 91 | 91 | ||
| 92 | (defconst nnfolder-version "nnfolder 2.0" | 92 | (defconst nnfolder-version "nnfolder 2.0" |
| 93 | "nnfolder version.") | 93 | "nnfolder version.") |
| 94 | (make-obsolete-variable 'nnfolder-version 'emacs-version "29.1") | ||
| 94 | 95 | ||
| 95 | (defconst nnfolder-article-marker "X-Gnus-Article-Number: " | 96 | (defconst nnfolder-article-marker "X-Gnus-Article-Number: " |
| 96 | "String used to demarcate what the article number for a message is.") | 97 | "String used to demarcate what the article number for a message is.") |
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 3dc74c95fb3..4d1ecbf8642 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | (require 'subr-x)) | 62 | (require 'subr-x)) |
| 63 | 63 | ||
| 64 | (defconst nnmaildir-version "Gnus") | 64 | (defconst nnmaildir-version "Gnus") |
| 65 | (make-obsolete-variable 'nnmaildir-version 'emacs-version "29.1") | ||
| 65 | 66 | ||
| 66 | (defconst nnmaildir-flag-mark-mapping | 67 | (defconst nnmaildir-flag-mark-mapping |
| 67 | '((?F . tick) | 68 | '((?F . tick) |
diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el index 96ecc34e156..5735c97805e 100644 --- a/lisp/gnus/nnmbox.el +++ b/lisp/gnus/nnmbox.el | |||
| @@ -52,6 +52,7 @@ | |||
| 52 | 52 | ||
| 53 | (defconst nnmbox-version "nnmbox 1.0" | 53 | (defconst nnmbox-version "nnmbox 1.0" |
| 54 | "nnmbox version.") | 54 | "nnmbox version.") |
| 55 | (make-obsolete-variable 'nnmbox-version 'emacs-version "29.1") | ||
| 55 | 56 | ||
| 56 | (defvoo nnmbox-current-group nil | 57 | (defvoo nnmbox-current-group nil |
| 57 | "Current nnmbox news group directory.") | 58 | "Current nnmbox news group directory.") |
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index 3902af7d2f6..bced527d03f 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el | |||
| @@ -55,6 +55,7 @@ as unread by Gnus.") | |||
| 55 | 55 | ||
| 56 | (defconst nnmh-version "nnmh 1.0" | 56 | (defconst nnmh-version "nnmh 1.0" |
| 57 | "nnmh version.") | 57 | "nnmh version.") |
| 58 | (make-obsolete-variable 'nnmh-version 'emacs-version "29.1") | ||
| 58 | 59 | ||
| 59 | (defvoo nnmh-current-directory nil | 60 | (defvoo nnmh-current-directory nil |
| 60 | "Current news group directory.") | 61 | "Current news group directory.") |
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index 7fe2b516cce..ae726ba0f7b 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el | |||
| @@ -89,6 +89,7 @@ non-nil.") | |||
| 89 | 89 | ||
| 90 | (defconst nnml-version "nnml 1.0" | 90 | (defconst nnml-version "nnml 1.0" |
| 91 | "nnml version.") | 91 | "nnml version.") |
| 92 | (make-obsolete-variable 'nnml-version 'emacs-version "29.1") | ||
| 92 | 93 | ||
| 93 | (defvoo nnml-nov-file-name ".overview") | 94 | (defvoo nnml-nov-file-name ".overview") |
| 94 | 95 | ||
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 8c96d3e0678..99e7b2a6f3f 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el | |||
| @@ -71,6 +71,7 @@ this variable to the list of fields to be ignored.") | |||
| 71 | (defvoo nnrss-status-string "") | 71 | (defvoo nnrss-status-string "") |
| 72 | 72 | ||
| 73 | (defconst nnrss-version "nnrss 1.0") | 73 | (defconst nnrss-version "nnrss 1.0") |
| 74 | (make-obsolete-variable 'nnrss-version 'emacs-version "29.1") | ||
| 74 | 75 | ||
| 75 | (defvar nnrss-group-alist '() | 76 | (defvar nnrss-group-alist '() |
| 76 | "List of RSS addresses.") | 77 | "List of RSS addresses.") |
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 39b89abb88a..e5eb4b81604 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el | |||
| @@ -114,6 +114,7 @@ there.") | |||
| 114 | 114 | ||
| 115 | (defconst nnspool-version "nnspool 2.0" | 115 | (defconst nnspool-version "nnspool 2.0" |
| 116 | "Version numbers of this version of NNSPOOL.") | 116 | "Version numbers of this version of NNSPOOL.") |
| 117 | (make-obsolete-variable 'nnspool-version 'emacs-version "29.1") | ||
| 117 | 118 | ||
| 118 | (defvoo nnspool-current-directory nil | 119 | (defvoo nnspool-current-directory nil |
| 119 | "Current news group directory.") | 120 | "Current news group directory.") |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 29570fa8c9f..6fa424a1555 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -259,6 +259,7 @@ update their active files often, this can help.") | |||
| 259 | (defvoo nntp-connection-alist nil) | 259 | (defvoo nntp-connection-alist nil) |
| 260 | (defvoo nntp-status-string "") | 260 | (defvoo nntp-status-string "") |
| 261 | (defconst nntp-version "nntp 5.0") | 261 | (defconst nntp-version "nntp 5.0") |
| 262 | (make-obsolete-variable 'nntp-version 'emacs-version "29.1") | ||
| 262 | (defvoo nntp-inhibit-erase nil) | 263 | (defvoo nntp-inhibit-erase nil) |
| 263 | (defvoo nntp-inhibit-output nil) | 264 | (defvoo nntp-inhibit-output nil) |
| 264 | 265 | ||
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index ae4265de7fb..7b192aa1d2e 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el | |||
| @@ -57,6 +57,7 @@ component group will show up when you enter the virtual group.") | |||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | (defconst nnvirtual-version "nnvirtual 1.1") | 59 | (defconst nnvirtual-version "nnvirtual 1.1") |
| 60 | (make-obsolete-variable 'nnvirtual-version 'emacs-version "29.1") | ||
| 60 | 61 | ||
| 61 | (defvoo nnvirtual-current-group nil) | 62 | (defvoo nnvirtual-current-group nil) |
| 62 | 63 | ||
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 59a509b2215..74e18285e64 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -1005,9 +1005,9 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." | |||
| 1005 | (help-fns--analyze-function function)) | 1005 | (help-fns--analyze-function function)) |
| 1006 | (file-name (find-lisp-object-file-name | 1006 | (file-name (find-lisp-object-file-name |
| 1007 | function (if aliased 'defun def))) | 1007 | function (if aliased 'defun def))) |
| 1008 | (beg (if (and (or (byte-code-function-p def) | 1008 | (beg (if (and (or (functionp def) |
| 1009 | (keymapp def) | 1009 | (keymapp def) |
| 1010 | (memq (car-safe def) '(macro lambda closure))) | 1010 | (eq (car-safe def) 'macro)) |
| 1011 | (stringp file-name) | 1011 | (stringp file-name) |
| 1012 | (help-fns--autoloaded-p function)) | 1012 | (help-fns--autoloaded-p function)) |
| 1013 | (concat | 1013 | (concat |
| @@ -1040,7 +1040,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." | |||
| 1040 | (t "Lisp function")))) | 1040 | (t "Lisp function")))) |
| 1041 | ((or (eq (car-safe def) 'macro) | 1041 | ((or (eq (car-safe def) 'macro) |
| 1042 | ;; For advised macros, def is a lambda | 1042 | ;; For advised macros, def is a lambda |
| 1043 | ;; expression or a byte-code-function-p, so we | 1043 | ;; expression or a compiled-function-p, so we |
| 1044 | ;; need to check macros before functions. | 1044 | ;; need to check macros before functions. |
| 1045 | (macrop function)) | 1045 | (macrop function)) |
| 1046 | (concat beg "Lisp macro")) | 1046 | (concat beg "Lisp macro")) |
| @@ -1534,8 +1534,8 @@ This cancels value editing without updating the value." | |||
| 1534 | (when safe-var | 1534 | (when safe-var |
| 1535 | (princ " This variable is safe as a file local variable ") | 1535 | (princ " This variable is safe as a file local variable ") |
| 1536 | (princ "if its value\n satisfies the predicate ") | 1536 | (princ "if its value\n satisfies the predicate ") |
| 1537 | (princ (if (byte-code-function-p safe-var) | 1537 | (princ (if (compiled-function-p safe-var) |
| 1538 | "which is a byte-compiled expression.\n" | 1538 | "which is a compiled expression.\n" |
| 1539 | (format-message "`%s'.\n" safe-var)))))) | 1539 | (format-message "`%s'.\n" safe-var)))))) |
| 1540 | 1540 | ||
| 1541 | (add-hook 'help-fns-describe-variable-functions #'help-fns--var-risky) | 1541 | (add-hook 'help-fns-describe-variable-functions #'help-fns--var-risky) |
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index dbcc152c15d..bf7446f151a 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el | |||
| @@ -81,11 +81,9 @@ | |||
| 81 | (eval-when-compile (require 'cl-lib)) | 81 | (eval-when-compile (require 'cl-lib)) |
| 82 | (require 'cus-edit) | 82 | (require 'cus-edit) |
| 83 | 83 | ||
| 84 | (defconst htmlfontify-version 0.21) | ||
| 85 | |||
| 86 | (defconst hfy-meta-tags | 84 | (defconst hfy-meta-tags |
| 87 | (format "<meta name=\"generator\" content=\"emacs %s; htmlfontify %0.2f\" />" | 85 | (format "<meta name=\"generator\" content=\"emacs %s; htmlfontify\" />" |
| 88 | emacs-version htmlfontify-version) | 86 | emacs-version) |
| 89 | "The generator meta tag for this version of htmlfontify.") | 87 | "The generator meta tag for this version of htmlfontify.") |
| 90 | 88 | ||
| 91 | (defconst htmlfontify-manual "Htmlfontify Manual" | 89 | (defconst htmlfontify-manual "Htmlfontify Manual" |
| @@ -2392,13 +2390,14 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'." | |||
| 2392 | (let ((file (hfy-initfile))) | 2390 | (let ((file (hfy-initfile))) |
| 2393 | (load file 'NOERROR nil nil) )) | 2391 | (load file 'NOERROR nil nil) )) |
| 2394 | 2392 | ||
| 2395 | ;; Obsolete. | ||
| 2396 | |||
| 2397 | (defun hfy-interq (set-a set-b) | 2393 | (defun hfy-interq (set-a set-b) |
| 2398 | "Return the intersection (using `eq') of two lists SET-A and SET-B." | 2394 | "Return the intersection (using `eq') of two lists SET-A and SET-B." |
| 2399 | (declare (obsolete seq-intersection "28.1")) | 2395 | (declare (obsolete seq-intersection "28.1")) |
| 2400 | (nreverse (seq-intersection set-a set-b #'eq))) | 2396 | (nreverse (seq-intersection set-a set-b #'eq))) |
| 2401 | 2397 | ||
| 2398 | (defconst htmlfontify-version 0.21) | ||
| 2399 | (make-obsolete-variable 'htmlfontify-version 'emacs-version "29.1") | ||
| 2400 | |||
| 2402 | (define-obsolete-function-alias 'hfy-prop-invisible-p #'invisible-p "29.1") | 2401 | (define-obsolete-function-alias 'hfy-prop-invisible-p #'invisible-p "29.1") |
| 2403 | 2402 | ||
| 2404 | (provide 'htmlfontify) | 2403 | (provide 'htmlfontify) |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index ca28222c815..d6e83c81e74 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -1525,6 +1525,17 @@ Setup `char-width-table' appropriate for non-CJK language environment." | |||
| 1525 | (aset char-acronym-table (+ #xE0021 i) (format " %c TAG" (+ 33 i)))) | 1525 | (aset char-acronym-table (+ #xE0021 i) (format " %c TAG" (+ 33 i)))) |
| 1526 | (aset char-acronym-table #xE007F "->|TAG") ; CANCEL TAG | 1526 | (aset char-acronym-table #xE007F "->|TAG") ; CANCEL TAG |
| 1527 | 1527 | ||
| 1528 | (dotimes (i 256) | ||
| 1529 | (let* ((vs-number (1+ i)) | ||
| 1530 | (codepoint (if (< i 16) | ||
| 1531 | (+ #xfe00 i) | ||
| 1532 | (+ #xe0100 i -16))) | ||
| 1533 | (delimiter (cond ((<= vs-number 9) "0") | ||
| 1534 | ((<= vs-number 99) "") | ||
| 1535 | (t " ")))) | ||
| 1536 | (aset char-acronym-table codepoint | ||
| 1537 | (format "VS%s%s" delimiter vs-number)))) | ||
| 1538 | |||
| 1528 | ;; We can't use the \N{name} things here, because this file is used | 1539 | ;; We can't use the \N{name} things here, because this file is used |
| 1529 | ;; too early in the build process. | 1540 | ;; too early in the build process. |
| 1530 | (defvar bidi-control-characters | 1541 | (defvar bidi-control-characters |
| @@ -1574,7 +1585,9 @@ option `glyphless-char-display'." | |||
| 1574 | #x80 #x9F method)) | 1585 | #x80 #x9F method)) |
| 1575 | ((eq target 'variation-selectors) | 1586 | ((eq target 'variation-selectors) |
| 1576 | (glyphless-set-char-table-range glyphless-char-display | 1587 | (glyphless-set-char-table-range glyphless-char-display |
| 1577 | #xFE00 #xFE0F method)) | 1588 | #xFE00 #xFE0F method) |
| 1589 | (glyphless-set-char-table-range glyphless-char-display | ||
| 1590 | #xE0100 #xE01EF method)) | ||
| 1578 | ((or (eq target 'format-control) | 1591 | ((or (eq target 'format-control) |
| 1579 | (eq target 'bidi-control)) | 1592 | (eq target 'bidi-control)) |
| 1580 | (when unicode-category-table | 1593 | (when unicode-category-table |
| @@ -1647,10 +1660,10 @@ GROUP must be one of these symbols: | |||
| 1647 | that are relevant for bidirectional formatting control, | 1660 | that are relevant for bidirectional formatting control, |
| 1648 | like U+2069 (PDI) and U+202B (RLE). | 1661 | like U+2069 (PDI) and U+202B (RLE). |
| 1649 | `variation-selectors': | 1662 | `variation-selectors': |
| 1650 | Characters in the range U+FE00..U+FE0F, used for | 1663 | Characters in the range U+FE00..U+FE0F and |
| 1651 | selecting alternate glyph presentations, such as | 1664 | U+E0100..U+E01EF, used for selecting alternate glyph |
| 1652 | Emoji vs Text presentation, of the preceding | 1665 | presentations, such as Emoji vs Text presentation, of |
| 1653 | character(s). | 1666 | the preceding character(s). |
| 1654 | `no-font': For GUI frames, characters for which no suitable | 1667 | `no-font': For GUI frames, characters for which no suitable |
| 1655 | font is found; for text-mode frames, characters | 1668 | font is found; for text-mode frames, characters |
| 1656 | that cannot be encoded by `terminal-coding-system'. | 1669 | that cannot be encoded by `terminal-coding-system'. |
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index e652f108dde..431d8369c1e 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el | |||
| @@ -702,7 +702,7 @@ is." | |||
| 702 | ;; Probhat Input Method | 702 | ;; Probhat Input Method |
| 703 | (quail-define-package | 703 | (quail-define-package |
| 704 | "bengali-probhat" "Bengali" "BngPB" t | 704 | "bengali-probhat" "Bengali" "BngPB" t |
| 705 | "Probhat keyboard for Bengali/Bangla" nil t nil nil nil nil nil nil nil nil t) | 705 | "Probhat keyboard for Bengali/Bangla" nil t nil t t nil nil nil nil nil t) |
| 706 | 706 | ||
| 707 | (quail-define-rules | 707 | (quail-define-rules |
| 708 | ("!" ?!) | 708 | ("!" ?!) |
diff --git a/lisp/loadup.el b/lisp/loadup.el index 8dad382ac0d..17e82cc0c49 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -154,8 +154,7 @@ | |||
| 154 | ;; Load-time macro-expansion can only take effect after setting | 154 | ;; Load-time macro-expansion can only take effect after setting |
| 155 | ;; load-source-file-function because of where it is called in lread.c. | 155 | ;; load-source-file-function because of where it is called in lread.c. |
| 156 | (load "emacs-lisp/macroexp") | 156 | (load "emacs-lisp/macroexp") |
| 157 | (if (or (byte-code-function-p (symbol-function 'macroexpand-all)) | 157 | (if (compiled-function-p (symbol-function 'macroexpand-all)) |
| 158 | (subr-native-elisp-p (symbol-function 'macroexpand-all))) | ||
| 159 | nil | 158 | nil |
| 160 | ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply | 159 | ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply |
| 161 | ;; fail until pcase is explicitly loaded. This also means that we have to | 160 | ;; fail until pcase is explicitly loaded. This also means that we have to |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 93af525e39d..a61620b2761 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -388,11 +388,11 @@ gnus-version) | |||
| 388 | (insert "MH-E " mh-version "\n\n") | 388 | (insert "MH-E " mh-version "\n\n") |
| 389 | ;; MH-E compilation details. | 389 | ;; MH-E compilation details. |
| 390 | (insert "MH-E compilation details:\n") | 390 | (insert "MH-E compilation details:\n") |
| 391 | (let* ((compiled-mhe (byte-code-function-p (symbol-function 'mh-version))) | 391 | (let* ((compiled-mhe (compiled-function-p (symbol-function 'mh-version))) |
| 392 | (gnus-compiled-version (if compiled-mhe | 392 | (gnus-compiled-version (if compiled-mhe |
| 393 | (mh-macro-expansion-time-gnus-version) | 393 | (mh-macro-expansion-time-gnus-version) |
| 394 | "N/A"))) | 394 | "N/A"))) |
| 395 | (insert " Byte compiled:\t\t" (if compiled-mhe "yes" "no") "\n" | 395 | (insert " Compiled:\t\t" (if compiled-mhe "yes" "no") "\n" |
| 396 | " Gnus (compile-time):\t" gnus-compiled-version "\n" | 396 | " Gnus (compile-time):\t" gnus-compiled-version "\n" |
| 397 | " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n")) | 397 | " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n")) |
| 398 | ;; Emacs version. | 398 | ;; Emacs version. |
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 637f53e6550..e98767ae7c7 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el | |||
| @@ -361,7 +361,8 @@ AGES is the list of ages that are to be shown." | |||
| 361 | (mapc (lambda (feed) | 361 | (mapc (lambda (feed) |
| 362 | (let ((feed-name-symbol (intern (car feed)))) | 362 | (let ((feed-name-symbol (intern (car feed)))) |
| 363 | (mapc (lambda (item) | 363 | (mapc (lambda (item) |
| 364 | (when (memq (newsticker--age item) ages) | 364 | (when (or (memq 'all ages) |
| 365 | (memq (newsticker--age item) ages)) | ||
| 365 | (newsticker--treeview-list-add-item | 366 | (newsticker--treeview-list-add-item |
| 366 | item feed-name-symbol t))) | 367 | item feed-name-symbol t))) |
| 367 | (newsticker--treeview-list-sort-items | 368 | (newsticker--treeview-list-sort-items |
| @@ -1218,11 +1219,11 @@ Note: does not update the layout." | |||
| 1218 | (newsticker--treeview-list-update t) | 1219 | (newsticker--treeview-list-update t) |
| 1219 | (newsticker--treeview-item-update) | 1220 | (newsticker--treeview-item-update) |
| 1220 | (newsticker--treeview-tree-update-tags) | 1221 | (newsticker--treeview-tree-update-tags) |
| 1221 | (cond (newsticker--treeview-current-feed | 1222 | (cond (newsticker--treeview-current-vfeed |
| 1222 | (newsticker--treeview-list-items newsticker--treeview-current-feed)) | ||
| 1223 | (newsticker--treeview-current-vfeed | ||
| 1224 | (newsticker--treeview-list-items-with-age | 1223 | (newsticker--treeview-list-items-with-age |
| 1225 | (intern newsticker--treeview-current-vfeed)))) | 1224 | (intern newsticker--treeview-current-vfeed))) |
| 1225 | (newsticker--treeview-current-feed | ||
| 1226 | (newsticker--treeview-list-items newsticker--treeview-current-feed))) | ||
| 1226 | (newsticker--treeview-tree-update-highlight) | 1227 | (newsticker--treeview-tree-update-highlight) |
| 1227 | (newsticker--treeview-list-update-highlight) | 1228 | (newsticker--treeview-list-update-highlight) |
| 1228 | (let ((cur-feed (or newsticker--treeview-current-feed | 1229 | (let ((cur-feed (or newsticker--treeview-current-feed |
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index d033667e87f..170583f608c 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -324,7 +324,7 @@ arguments to pass to the OPERATION." | |||
| 324 | (tramp-compat-file-name-concat localname ".")) | 324 | (tramp-compat-file-name-concat localname ".")) |
| 325 | (tramp-shell-quote-argument | 325 | (tramp-shell-quote-argument |
| 326 | (tramp-compat-file-name-concat localname "..")))) | 326 | (tramp-compat-file-name-concat localname "..")))) |
| 327 | (replace-regexp-in-region | 327 | (tramp-compat-replace-regexp-in-region |
| 328 | (regexp-quote | 328 | (regexp-quote |
| 329 | (tramp-compat-file-name-unquote | 329 | (tramp-compat-file-name-unquote |
| 330 | (file-name-as-directory localname))) | 330 | (file-name-as-directory localname))) |
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index fda1441615e..548999ca1d2 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el | |||
| @@ -325,7 +325,7 @@ arguments to pass to the OPERATION." | |||
| 325 | ;; Starting with Emacs 29, `tramp-archive-file-name-handler' is | 325 | ;; Starting with Emacs 29, `tramp-archive-file-name-handler' is |
| 326 | ;; autoloaded. But it must still be in tramp-loaddefs.el for older | 326 | ;; autoloaded. But it must still be in tramp-loaddefs.el for older |
| 327 | ;; Emacsen. | 327 | ;; Emacsen. |
| 328 | ;;;###autoload(autoload 'tramp-archive-file-name-handler "tramp-archine") | 328 | ;;;###autoload(autoload 'tramp-archive-file-name-handler "tramp-archive") |
| 329 | ;;;###tramp-autoload | 329 | ;;;###tramp-autoload |
| 330 | (defun tramp-archive-file-name-handler (operation &rest args) | 330 | (defun tramp-archive-file-name-handler (operation &rest args) |
| 331 | "Invoke the file archive related OPERATION. | 331 | "Invoke the file archive related OPERATION. |
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index b83f9f0724e..203d3ede98f 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el | |||
| @@ -330,6 +330,29 @@ CONDITION can also be a list of error conditions." | |||
| 330 | (autoload 'netrc-parse "netrc") | 330 | (autoload 'netrc-parse "netrc") |
| 331 | (netrc-parse file)))) | 331 | (netrc-parse file)))) |
| 332 | 332 | ||
| 333 | ;; Function `replace-regexp-in-region' is new in Emacs 28.1. | ||
| 334 | (defalias 'tramp-compat-replace-regexp-in-region | ||
| 335 | (if (fboundp 'replace-regexp-in-region) | ||
| 336 | #'replace-regexp-in-region | ||
| 337 | (lambda (regexp replacement &optional start end) | ||
| 338 | (if start | ||
| 339 | (when (< start (point-min)) | ||
| 340 | (error "Start before start of buffer")) | ||
| 341 | (setq start (point))) | ||
| 342 | (if end | ||
| 343 | (when (> end (point-max)) | ||
| 344 | (error "End after end of buffer")) | ||
| 345 | (setq end (point-max))) | ||
| 346 | (save-excursion | ||
| 347 | (let ((matches 0) | ||
| 348 | (case-fold-search nil)) | ||
| 349 | (goto-char start) | ||
| 350 | (while (re-search-forward regexp end t) | ||
| 351 | (replace-match replacement t) | ||
| 352 | (setq matches (1+ matches))) | ||
| 353 | (and (not (zerop matches)) | ||
| 354 | matches)))))) | ||
| 355 | |||
| 333 | (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) | 356 | (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) |
| 334 | (put (intern elt) 'tramp-suppress-trace t)) | 357 | (put (intern elt) 'tramp-suppress-trace t)) |
| 335 | 358 | ||
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 7f385292626..27b359d439b 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el | |||
| @@ -426,7 +426,7 @@ Otherwise, return NAME." | |||
| 426 | (if (directory-name-p name) #'file-name-as-directory #'identity) | 426 | (if (directory-name-p name) #'file-name-as-directory #'identity) |
| 427 | (concat | 427 | (concat |
| 428 | dir | 428 | dir |
| 429 | (unless (string-equal localname "/") | 429 | (unless (string-match-p (rx (seq bos (opt "/") eos)) localname) |
| 430 | (with-tramp-file-property | 430 | (with-tramp-file-property |
| 431 | crypt-vec localname (concat (symbol-name op) "-file-name") | 431 | crypt-vec localname (concat (symbol-name op) "-file-name") |
| 432 | (unless (tramp-crypt-send-command | 432 | (unless (tramp-crypt-send-command |
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 0b40ff867f2..ca5e959bea5 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -1055,9 +1055,10 @@ file names." | |||
| 1055 | ;; code in case of direct copy/move. Apply | 1055 | ;; code in case of direct copy/move. Apply |
| 1056 | ;; sanity checks. | 1056 | ;; sanity checks. |
| 1057 | (or (not equal-remote) | 1057 | (or (not equal-remote) |
| 1058 | (tramp-gvfs-info newname) | 1058 | (and |
| 1059 | (eq op 'copy) | 1059 | (tramp-gvfs-info newname) |
| 1060 | (not (tramp-gvfs-info filename)))) | 1060 | (or (eq op 'copy) |
| 1061 | (not (tramp-gvfs-info filename)))))) | ||
| 1061 | 1062 | ||
| 1062 | (if (or (not equal-remote) | 1063 | (if (or (not equal-remote) |
| 1063 | (and equal-remote | 1064 | (and equal-remote |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index a2b675cf885..f2e3c48235a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4205,14 +4205,17 @@ file exists and nonzero exit status otherwise." | |||
| 4205 | ;; by some sh implementations (eg, bash when called as sh) on | 4205 | ;; by some sh implementations (eg, bash when called as sh) on |
| 4206 | ;; startup; this way, we avoid the startup file clobbering $PS1. | 4206 | ;; startup; this way, we avoid the startup file clobbering $PS1. |
| 4207 | ;; $PROMPT_COMMAND is another way to set the prompt in /bin/bash, | 4207 | ;; $PROMPT_COMMAND is another way to set the prompt in /bin/bash, |
| 4208 | ;; it must be discarded as well. $HISTFILE is set according to | 4208 | ;; it must be discarded as well. Some ssh daemons (for example, |
| 4209 | ;; `tramp-histfile-override'. $TERM and $INSIDE_EMACS set here to | 4209 | ;; on Android devices) do not acknowledge the $PS1 setting in |
| 4210 | ;; ensure they have the correct values when the shell starts, not | 4210 | ;; that call, so we make a further sanity check. (Bug#57044) |
| 4211 | ;; just processes run within the shell. (Which processes include | 4211 | ;; $HISTFILE is set according to `tramp-histfile-override'. $TERM |
| 4212 | ;; our initial probes to ensure the remote shell is usable.) | 4212 | ;; and $INSIDE_EMACS set here to ensure they have the correct |
| 4213 | ;; For the time being, we assume that all shells interpret -i as | 4213 | ;; values when the shell starts, not just processes run within the |
| 4214 | ;; interactive shell. Must be the last argument, because (for | 4214 | ;; shell. (Which processes include our initial probes to ensure |
| 4215 | ;; example) bash expects long options first. | 4215 | ;; the remote shell is usable.) For the time being, we assume |
| 4216 | ;; that all shells interpret -i as interactive shell. Must be the | ||
| 4217 | ;; last argument, because (for example) bash expects long options | ||
| 4218 | ;; first. | ||
| 4216 | (tramp-send-command | 4219 | (tramp-send-command |
| 4217 | vec (format | 4220 | vec (format |
| 4218 | (concat | 4221 | (concat |
| @@ -4228,7 +4231,21 @@ file exists and nonzero exit status otherwise." | |||
| 4228 | "")) | 4231 | "")) |
| 4229 | (tramp-shell-quote-argument tramp-end-of-output) | 4232 | (tramp-shell-quote-argument tramp-end-of-output) |
| 4230 | shell (or (tramp-get-sh-extra-args shell) "")) | 4233 | shell (or (tramp-get-sh-extra-args shell) "")) |
| 4231 | t) | 4234 | t t) |
| 4235 | |||
| 4236 | ;; Sanity check. | ||
| 4237 | (tramp-barf-if-no-shell-prompt | ||
| 4238 | (tramp-get-connection-process vec) 10 | ||
| 4239 | "Couldn't find remote shell prompt for %s" shell) | ||
| 4240 | (unless | ||
| 4241 | (tramp-check-for-regexp | ||
| 4242 | (tramp-get-connection-process vec) (regexp-quote tramp-end-of-output)) | ||
| 4243 | (tramp-message vec 5 "Setting shell prompt") | ||
| 4244 | (tramp-send-command | ||
| 4245 | vec (format "PS1=%s PS2='' PS3='' PROMPT_COMMAND=''" | ||
| 4246 | (tramp-shell-quote-argument tramp-end-of-output)) | ||
| 4247 | t)) | ||
| 4248 | |||
| 4232 | ;; Check proper HISTFILE setting. We give up when not working. | 4249 | ;; Check proper HISTFILE setting. We give up when not working. |
| 4233 | (when (and (stringp tramp-histfile-override) | 4250 | (when (and (stringp tramp-histfile-override) |
| 4234 | (file-name-directory tramp-histfile-override)) | 4251 | (file-name-directory tramp-histfile-override)) |
| @@ -5524,10 +5541,14 @@ Nonexistent directories are removed from spec." | |||
| 5524 | ;; "--color=never" argument (for example on FreeBSD). | 5541 | ;; "--color=never" argument (for example on FreeBSD). |
| 5525 | (when (tramp-send-command-and-check | 5542 | (when (tramp-send-command-and-check |
| 5526 | vec (format "%s -lnd /" result)) | 5543 | vec (format "%s -lnd /" result)) |
| 5527 | (when (tramp-send-command-and-check | 5544 | (when (and (tramp-send-command-and-check |
| 5528 | vec (format | 5545 | vec (format |
| 5529 | "%s --color=never -al %s" | 5546 | "%s --color=never -al %s" |
| 5530 | result (tramp-get-remote-null-device vec))) | 5547 | result (tramp-get-remote-null-device vec))) |
| 5548 | (not (string-match-p | ||
| 5549 | (regexp-quote "\e") | ||
| 5550 | (tramp-get-buffer-string | ||
| 5551 | (tramp-get-buffer vec))))) | ||
| 5531 | (setq result (concat result " --color=never"))) | 5552 | (setq result (concat result " --color=never"))) |
| 5532 | (throw 'ls-found result)) | 5553 | (throw 'ls-found result)) |
| 5533 | (setq dl (cdr dl)))))) | 5554 | (setq dl (cdr dl)))))) |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 68f522b060a..df708a2159d 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -3807,10 +3807,6 @@ This is needed for font-lock setup.") | |||
| 3807 | (declare-function dired-get-filename | 3807 | (declare-function dired-get-filename |
| 3808 | "dired" | 3808 | "dired" |
| 3809 | (&optional localp no-error-if-not-filep)) | 3809 | (&optional localp no-error-if-not-filep)) |
| 3810 | (declare-function iswitchb-read-buffer | ||
| 3811 | "iswitchb" | ||
| 3812 | (prompt &optional | ||
| 3813 | default require-match _predicate start matches-set)) | ||
| 3814 | (declare-function org-agenda-change-all-lines | 3810 | (declare-function org-agenda-change-all-lines |
| 3815 | "org-agenda" | 3811 | "org-agenda" |
| 3816 | (newhead hdmarker &optional fixface just-this)) | 3812 | (newhead hdmarker &optional fixface just-this)) |
| @@ -3844,7 +3840,6 @@ This is needed for font-lock setup.") | |||
| 3844 | (defvar calc-embedded-open-formula) | 3840 | (defvar calc-embedded-open-formula) |
| 3845 | (defvar calc-embedded-open-mode) | 3841 | (defvar calc-embedded-open-mode) |
| 3846 | (defvar font-lock-unfontify-region-function) | 3842 | (defvar font-lock-unfontify-region-function) |
| 3847 | (defvar iswitchb-temp-buflist) | ||
| 3848 | (defvar org-agenda-tags-todo-honor-ignore-options) | 3843 | (defvar org-agenda-tags-todo-honor-ignore-options) |
| 3849 | (defvar remember-data-file) | 3844 | (defvar remember-data-file) |
| 3850 | (defvar texmathp-why) | 3845 | (defvar texmathp-why) |
diff --git a/lisp/outline.el b/lisp/outline.el index 35524a79a90..3250b62f1e7 100644 --- a/lisp/outline.el +++ b/lisp/outline.el | |||
| @@ -281,7 +281,7 @@ This option is only in effect when `outline-minor-mode-cycle' is non-nil." | |||
| 281 | [outline-1 outline-2 outline-3 outline-4 | 281 | [outline-1 outline-2 outline-3 outline-4 |
| 282 | outline-5 outline-6 outline-7 outline-8]) | 282 | outline-5 outline-6 outline-7 outline-8]) |
| 283 | 283 | ||
| 284 | (defcustom outline-minor-mode-use-buttons '(derived-mode . special-mode) | 284 | (defcustom outline-minor-mode-use-buttons '(derived-mode . help-mode) |
| 285 | "Whether to display clickable buttons on the headings. | 285 | "Whether to display clickable buttons on the headings. |
| 286 | The value should be a `buffer-match-p' condition. | 286 | The value should be a `buffer-match-p' condition. |
| 287 | 287 | ||
| @@ -294,16 +294,16 @@ buffers (yet) -- that will be amended in a future version." | |||
| 294 | :version "29.1") | 294 | :version "29.1") |
| 295 | 295 | ||
| 296 | (define-icon outline-open button | 296 | (define-icon outline-open button |
| 297 | '((emoji "â–¶ï¸") | 297 | '((emoji "🔽") |
| 298 | (symbol " ⯈ ") | 298 | (symbol " ▼ ") |
| 299 | (text " open ")) | 299 | (text " open ")) |
| 300 | "Icon used for buttons for opening a section in outline buffers." | 300 | "Icon used for buttons for opening a section in outline buffers." |
| 301 | :version "29.1" | 301 | :version "29.1" |
| 302 | :help-echo "Open this section") | 302 | :help-echo "Open this section") |
| 303 | 303 | ||
| 304 | (define-icon outline-close button | 304 | (define-icon outline-close button |
| 305 | '((emoji "🔽") | 305 | '((emoji "â–¶ï¸") |
| 306 | (symbol " ⯆ ") | 306 | (symbol " ▶ ") |
| 307 | (text " close ")) | 307 | (text " close ")) |
| 308 | "Icon used for buttons for closing a section in outline buffers." | 308 | "Icon used for buttons for closing a section in outline buffers." |
| 309 | :version "29.1" | 309 | :version "29.1" |
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 8fe72ddf593..fb944f4d76a 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el | |||
| @@ -82,13 +82,6 @@ | |||
| 82 | 82 | ||
| 83 | ;; Non-customize variables. | 83 | ;; Non-customize variables. |
| 84 | 84 | ||
| 85 | (defmacro 5x5-defvar-local (var value doc) | ||
| 86 | "Define VAR to VALUE with documentation DOC and make it buffer local." | ||
| 87 | (declare (obsolete defvar-local "28.1")) | ||
| 88 | `(progn | ||
| 89 | (defvar ,var ,value ,doc) | ||
| 90 | (make-variable-buffer-local (quote ,var)))) | ||
| 91 | |||
| 92 | (defvar-local 5x5-grid nil | 85 | (defvar-local 5x5-grid nil |
| 93 | "5x5 grid contents.") | 86 | "5x5 grid contents.") |
| 94 | 87 | ||
| @@ -930,14 +923,15 @@ lest." | |||
| 930 | 923 | ||
| 931 | ;; Support functions | 924 | ;; Support functions |
| 932 | 925 | ||
| 933 | (define-obsolete-function-alias '5x5-xor 'xor "27.1") | ||
| 934 | |||
| 935 | (defun 5x5-y-or-n-p (prompt) | 926 | (defun 5x5-y-or-n-p (prompt) |
| 936 | "5x5 wrapper for `y-or-n-p' which respects the `5x5-hassle-me' setting." | 927 | "5x5 wrapper for `y-or-n-p' which respects the `5x5-hassle-me' setting." |
| 937 | (if 5x5-hassle-me | 928 | (if 5x5-hassle-me |
| 938 | (y-or-n-p prompt) | 929 | (y-or-n-p prompt) |
| 939 | t)) | 930 | t)) |
| 940 | 931 | ||
| 932 | (define-obsolete-function-alias '5x5-xor #'xor "27.1") | ||
| 933 | (define-obsolete-function-alias '5x5-defvar-local #'defvar-local "28.1") | ||
| 934 | |||
| 941 | (provide '5x5) | 935 | (provide '5x5) |
| 942 | 936 | ||
| 943 | ;;; 5x5.el ends here | 937 | ;;; 5x5.el ends here |
diff --git a/lisp/printing.el b/lisp/printing.el index 83c9ffc9cbd..534b45c772b 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -4,16 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> |
| 6 | ;; Keywords: wp, print, PostScript | 6 | ;; Keywords: wp, print, PostScript |
| 7 | ;; Version: 6.9.3 | 7 | ;; Old-Version: 6.9.3 |
| 8 | ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 8 | ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 9 | 9 | ||
| 10 | (defconst pr-version "6.9.3" | ||
| 11 | "printing.el, v 6.9.3 <2007/12/09 vinicius> | ||
| 12 | |||
| 13 | Please send all bug fixes and enhancements to | ||
| 14 | bug-gnu-emacs@gnu.org and Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> | ||
| 15 | ") | ||
| 16 | |||
| 17 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 18 | 11 | ||
| 19 | ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| @@ -63,10 +56,6 @@ Please send all bug fixes and enhancements to | |||
| 63 | ;; spool and to despool PostScript buffer. So, `printing' provides an | 56 | ;; spool and to despool PostScript buffer. So, `printing' provides an |
| 64 | ;; interface to ps-print package and it also provides some extra stuff. | 57 | ;; interface to ps-print package and it also provides some extra stuff. |
| 65 | ;; | 58 | ;; |
| 66 | ;; To download the latest ps-print package see | ||
| 67 | ;; `https://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage'. | ||
| 68 | ;; Please, see README file for ps-print installation instructions. | ||
| 69 | ;; | ||
| 70 | ;; `printing' was inspired by: | 59 | ;; `printing' was inspired by: |
| 71 | ;; | 60 | ;; |
| 72 | ;; print-nt.el Frederic Corne <frederic.corne@erli.fr> | 61 | ;; print-nt.el Frederic Corne <frederic.corne@erli.fr> |
| @@ -942,11 +931,6 @@ Please send all bug fixes and enhancements to | |||
| 942 | ;; | 931 | ;; |
| 943 | ;; Below are some URL where you can find good utilities. | 932 | ;; Below are some URL where you can find good utilities. |
| 944 | ;; | 933 | ;; |
| 945 | ;; * For `printing' package: | ||
| 946 | ;; | ||
| 947 | ;; printing `https://www.emacswiki.org/cgi-bin/emacs/download/printing.el' | ||
| 948 | ;; ps-print `https://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage' | ||
| 949 | ;; | ||
| 950 | ;; * For GNU or Unix system: | 934 | ;; * For GNU or Unix system: |
| 951 | ;; | 935 | ;; |
| 952 | ;; gs, gv `https://www.gnu.org/software/ghostscript/ghostscript.html' | 936 | ;; gs, gv `https://www.gnu.org/software/ghostscript/ghostscript.html' |
| @@ -1015,10 +999,6 @@ Please send all bug fixes and enhancements to | |||
| 1015 | (require 'lpr) | 999 | (require 'lpr) |
| 1016 | (require 'ps-print) | 1000 | (require 'ps-print) |
| 1017 | 1001 | ||
| 1018 | (and (string< ps-print-version "6.6.4") | ||
| 1019 | (error "`printing' requires `ps-print' package version 6.6.4 or later")) | ||
| 1020 | |||
| 1021 | |||
| 1022 | (defconst pr-cygwin-system | 1002 | (defconst pr-cygwin-system |
| 1023 | (and lpr-windows-system (getenv "OSTYPE") | 1003 | (and lpr-windows-system (getenv "OSTYPE") |
| 1024 | (string-match "cygwin" (getenv "OSTYPE")))) | 1004 | (string-match "cygwin" (getenv "OSTYPE")))) |
| @@ -3007,9 +2987,7 @@ Calls `pr-update-menus' to adjust menus." | |||
| 3007 | 2987 | ||
| 3008 | 2988 | ||
| 3009 | (defconst pr-help-message | 2989 | (defconst pr-help-message |
| 3010 | (concat "printing.el version " pr-version | 2990 | "\ |
| 3011 | " ps-print.el version " ps-print-version | ||
| 3012 | "\n\n | ||
| 3013 | Menu Layout | 2991 | Menu Layout |
| 3014 | ----------- | 2992 | ----------- |
| 3015 | 2993 | ||
| @@ -3215,14 +3193,12 @@ VI. Customization: | |||
| 3215 | 23. Show current settings for `printing', `ps-print' or `lpr'. | 3193 | 23. Show current settings for `printing', `ps-print' or `lpr'. |
| 3216 | 3194 | ||
| 3217 | 24. Quick help for printing menu layout. | 3195 | 24. Quick help for printing menu layout. |
| 3218 | ") | 3196 | " |
| 3219 | "Printing help message.") | 3197 | "Printing help message.") |
| 3220 | 3198 | ||
| 3221 | 3199 | ||
| 3222 | (defconst pr-interface-help-message | 3200 | (defconst pr-interface-help-message |
| 3223 | (concat "printing.el version " pr-version | 3201 | "\ |
| 3224 | " ps-print.el version " ps-print-version | ||
| 3225 | "\n\n | ||
| 3226 | The printing interface buffer has the same functionality as the printing menu. | 3202 | The printing interface buffer has the same functionality as the printing menu. |
| 3227 | The major difference is that the states (like sending PostScript generated to a | 3203 | The major difference is that the states (like sending PostScript generated to a |
| 3228 | file, n-up printing, etc.) are set and saved between printing buffer | 3204 | file, n-up printing, etc.) are set and saved between printing buffer |
| @@ -3449,7 +3425,7 @@ The printing interface buffer has the following sections: | |||
| 3449 | 3425 | ||
| 3450 | Quick help for printing interface buffer and printing menu layout. You can | 3426 | Quick help for printing interface buffer and printing menu layout. You can |
| 3451 | also quit the printing interface buffer or kill all printing help buffer. | 3427 | also quit the printing interface buffer or kill all printing help buffer. |
| 3452 | ") | 3428 | " |
| 3453 | "Printing buffer interface help message.") | 3429 | "Printing buffer interface help message.") |
| 3454 | 3430 | ||
| 3455 | 3431 | ||
| @@ -4402,7 +4378,6 @@ Or choose the menu option Printing/Show Settings/printing." | |||
| 4402 | (mapconcat | 4378 | (mapconcat |
| 4403 | #'ps-print-quote | 4379 | #'ps-print-quote |
| 4404 | (list | 4380 | (list |
| 4405 | (concat "\n;;; printing.el version " pr-version "\n") | ||
| 4406 | ";; internal vars" | 4381 | ";; internal vars" |
| 4407 | (ps-comment-string "emacs-version " emacs-version) | 4382 | (ps-comment-string "emacs-version " emacs-version) |
| 4408 | (ps-comment-string "pr-txt-command " pr-txt-command) | 4383 | (ps-comment-string "pr-txt-command " pr-txt-command) |
| @@ -5597,9 +5572,6 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." | |||
| 5597 | (switch-to-buffer (get-buffer-create pr-buffer-name)) | 5572 | (switch-to-buffer (get-buffer-create pr-buffer-name)) |
| 5598 | 5573 | ||
| 5599 | ;; header | 5574 | ;; header |
| 5600 | (let ((versions (concat "printing v" pr-version | ||
| 5601 | " ps-print v" ps-print-version))) | ||
| 5602 | (widget-insert (make-string (- 79 (length versions)) ?\ ) versions)) | ||
| 5603 | (pr-insert-italic "\nCurrent Directory : " 1) | 5575 | (pr-insert-italic "\nCurrent Directory : " 1) |
| 5604 | (pr-insert-italic default-directory) | 5576 | (pr-insert-italic default-directory) |
| 5605 | 5577 | ||
| @@ -6213,6 +6185,12 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." | |||
| 6213 | 6185 | ||
| 6214 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 6186 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 6215 | 6187 | ||
| 6188 | (defconst pr-version "6.9.3" | ||
| 6189 | "printing.el, v 6.9.3 <2007/12/09 vinicius> | ||
| 6190 | |||
| 6191 | Please send all bug fixes and enhancements to | ||
| 6192 | bug-gnu-emacs@gnu.org and Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>") | ||
| 6193 | (make-obsolete-variable 'pr-version 'emacs-version "29.1") | ||
| 6216 | 6194 | ||
| 6217 | (provide 'printing) | 6195 | (provide 'printing) |
| 6218 | 6196 | ||
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index e19726a7eab..6e42da2d54f 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> | 5 | ;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> |
| 6 | ;; Keywords: wp, ebnf, PostScript | 6 | ;; Keywords: wp, ebnf, PostScript |
| 7 | ;; Version: 4.4 | 7 | ;; Old-Version: 4.4 |
| 8 | ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 8 | ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| @@ -22,16 +22,6 @@ | |||
| 22 | ;; You should have received a copy of the GNU General Public License | 22 | ;; You should have received a copy of the GNU General Public License |
| 23 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. | 23 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. |
| 24 | 24 | ||
| 25 | (defconst ebnf-version "4.4" | ||
| 26 | "ebnf2ps.el, v 4.4 <2007/02/12 vinicius> | ||
| 27 | |||
| 28 | Vinicius's last change version. When reporting bugs, please also | ||
| 29 | report the version of Emacs, if any, that ebnf2ps was running with. | ||
| 30 | |||
| 31 | Please send all bug fixes and enhancements to | ||
| 32 | Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.") | ||
| 33 | |||
| 34 | |||
| 35 | ;;; Commentary: | 25 | ;;; Commentary: |
| 36 | 26 | ||
| 37 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 27 | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -45,20 +35,12 @@ Please send all bug fixes and enhancements to | |||
| 45 | ;; | 35 | ;; |
| 46 | ;; (require 'ebnf2ps) | 36 | ;; (require 'ebnf2ps) |
| 47 | ;; | 37 | ;; |
| 48 | ;; ebnf2ps uses ps-print package (version 5.2.3 or later), so see ps-print to | 38 | ;; ebnf2ps uses ps-print package (bundled with Emacs), so see ps-print to |
| 49 | ;; know how to set options like landscape printing, page headings, margins, | 39 | ;; know how to set options like landscape printing, page headings, margins, |
| 50 | ;; etc. | 40 | ;; etc. |
| 51 | ;; | 41 | ;; |
| 52 | ;; NOTE: ps-print zebra stripes and line number options doesn't have effect on | 42 | ;; NOTE: ps-print zebra stripes and line number options don't have an |
| 53 | ;; ebnf2ps, they behave as it's turned off. | 43 | ;; effect on ebnf2ps, they behave as if it's turned off. |
| 54 | ;; | ||
| 55 | ;; For good performance, be sure to byte-compile ebnf2ps.el, e.g. | ||
| 56 | ;; | ||
| 57 | ;; M-x byte-compile-file <give the path to ebnf2ps.el when prompted> | ||
| 58 | ;; | ||
| 59 | ;; This will generate ebnf2ps.elc, which will be loaded instead of ebnf2ps.el. | ||
| 60 | ;; | ||
| 61 | ;; ebnf2ps was tested with GNU Emacs 20.4.1. | ||
| 62 | ;; | 44 | ;; |
| 63 | ;; | 45 | ;; |
| 64 | ;; Using ebnf2ps | 46 | ;; Using ebnf2ps |
| @@ -1154,9 +1136,6 @@ Please send all bug fixes and enhancements to | |||
| 1154 | (require 'ps-print) | 1136 | (require 'ps-print) |
| 1155 | (eval-when-compile (require 'cl-lib)) | 1137 | (eval-when-compile (require 'cl-lib)) |
| 1156 | 1138 | ||
| 1157 | (and (string< ps-print-version "5.2.3") | ||
| 1158 | (error "`ebnf2ps' requires `ps-print' package version 5.2.3 or later")) | ||
| 1159 | |||
| 1160 | 1139 | ||
| 1161 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1140 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 1162 | ;; User Variables: | 1141 | ;; User Variables: |
| @@ -2455,8 +2434,6 @@ See also `ebnf-syntax-buffer'." | |||
| 2455 | "Return the current ebnf2ps setup." | 2434 | "Return the current ebnf2ps setup." |
| 2456 | (format | 2435 | (format |
| 2457 | " | 2436 | " |
| 2458 | ;;; ebnf2ps.el version %s | ||
| 2459 | |||
| 2460 | ;;; Emacs version %S | 2437 | ;;; Emacs version %S |
| 2461 | 2438 | ||
| 2462 | \(setq ebnf-special-show-delimiter %S | 2439 | \(setq ebnf-special-show-delimiter %S |
| @@ -2525,7 +2502,6 @@ See also `ebnf-syntax-buffer'." | |||
| 2525 | 2502 | ||
| 2526 | ;;; ebnf2ps.el - end of settings | 2503 | ;;; ebnf2ps.el - end of settings |
| 2527 | " | 2504 | " |
| 2528 | ebnf-version | ||
| 2529 | emacs-version | 2505 | emacs-version |
| 2530 | ebnf-special-show-delimiter | 2506 | ebnf-special-show-delimiter |
| 2531 | (ps-print-quote ebnf-special-font) | 2507 | (ps-print-quote ebnf-special-font) |
| @@ -2958,7 +2934,7 @@ See section \"Actions in Comments\" in ebnf2ps documentation.") | |||
| 2958 | 2934 | ||
| 2959 | 2935 | ||
| 2960 | (defvar ebnf-eps-file-alist nil | 2936 | (defvar ebnf-eps-file-alist nil |
| 2961 | "Alist associating file name with EPS header and footer. | 2937 | "Alist associating file name with EPS header and footer. |
| 2962 | 2938 | ||
| 2963 | Each element has the following form: | 2939 | Each element has the following form: |
| 2964 | 2940 | ||
| @@ -5242,11 +5218,7 @@ killed after process termination." | |||
| 5242 | (not (search-forward "& ebnf2ps v" | 5218 | (not (search-forward "& ebnf2ps v" |
| 5243 | (line-end-position) | 5219 | (line-end-position) |
| 5244 | t)) | 5220 | t)) |
| 5245 | (progn | 5221 | (progn |
| 5246 | ;; adjust creator comment | ||
| 5247 | (end-of-line) | ||
| 5248 | ;; (backward-char) | ||
| 5249 | (insert " & ebnf2ps v" ebnf-version) | ||
| 5250 | ;; insert ebnf settings & engine | 5222 | ;; insert ebnf settings & engine |
| 5251 | (goto-char (point-max)) | 5223 | (goto-char (point-max)) |
| 5252 | (search-backward "\n%%EndProlog\n") | 5224 | (search-backward "\n%%EndProlog\n") |
| @@ -5272,7 +5244,7 @@ killed after process termination." | |||
| 5272 | (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y)) | 5244 | (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y)) |
| 5273 | "\n%%Title: " filename | 5245 | "\n%%Title: " filename |
| 5274 | "\n%%CreationDate: " (format-time-string "%T %b %d %Y") | 5246 | "\n%%CreationDate: " (format-time-string "%T %b %d %Y") |
| 5275 | "\n%%Creator: " (user-full-name) " (using ebnf2ps v" ebnf-version ")" | 5247 | "\n%%Creator: " (user-full-name) " (using GNU Emacs " emacs-version ")" |
| 5276 | "\n%%DocumentNeededResources: font " | 5248 | "\n%%DocumentNeededResources: font " |
| 5277 | (or ebnf-fonts-required | 5249 | (or ebnf-fonts-required |
| 5278 | (setq ebnf-fonts-required | 5250 | (setq ebnf-fonts-required |
| @@ -6350,6 +6322,15 @@ killed after process termination." | |||
| 6350 | 6322 | ||
| 6351 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 6323 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 6352 | 6324 | ||
| 6325 | (defconst ebnf-version "4.4" | ||
| 6326 | "ebnf2ps.el, v 4.4 <2007/02/12 vinicius> | ||
| 6327 | |||
| 6328 | Vinicius's last change version. When reporting bugs, please also | ||
| 6329 | report the version of Emacs, if any, that ebnf2ps was running with. | ||
| 6330 | |||
| 6331 | Please send all bug fixes and enhancements to | ||
| 6332 | bug-gnu-emacs@gnu.org and Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.") | ||
| 6333 | (make-obsolete-variable 'ebnf-version 'emacs-version "29.1") | ||
| 6353 | 6334 | ||
| 6354 | (provide 'ebnf2ps) | 6335 | (provide 'ebnf2ps) |
| 6355 | 6336 | ||
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index dcd74f0369c..443281c4f07 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -116,12 +116,11 @@ | |||
| 116 | ;; non-nil, the line numbers are never touched. | 116 | ;; non-nil, the line numbers are never touched. |
| 117 | ;; 2) Multi-; statements like "do i=1,20 ; j=j+i ; end do" are not handled | 117 | ;; 2) Multi-; statements like "do i=1,20 ; j=j+i ; end do" are not handled |
| 118 | ;; correctly, but I imagine them to be rare. | 118 | ;; correctly, but I imagine them to be rare. |
| 119 | ;; 3) Regexps for hilit19 are no longer supported. | 119 | ;; 3) For FIXED FORMAT code, use fortran mode. |
| 120 | ;; 4) For FIXED FORMAT code, use fortran mode. | 120 | ;; 4) Preprocessor directives, i.e., lines starting with # are left-justified |
| 121 | ;; 5) Preprocessor directives, i.e., lines starting with # are left-justified | ||
| 122 | ;; and are untouched by all case-changing commands. There is, at present, no | 121 | ;; and are untouched by all case-changing commands. There is, at present, no |
| 123 | ;; mechanism for treating multi-line directives (continued by \ ). | 122 | ;; mechanism for treating multi-line directives (continued by \ ). |
| 124 | ;; 6) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented. | 123 | ;; 5) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented. |
| 125 | ;; You are urged to use f90-do loops (with labels if you wish). | 124 | ;; You are urged to use f90-do loops (with labels if you wish). |
| 126 | 125 | ||
| 127 | ;; List of user commands | 126 | ;; List of user commands |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 9c2c6405253..c256198b3c1 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -92,6 +92,7 @@ | |||
| 92 | (require 'cl-seq) | 92 | (require 'cl-seq) |
| 93 | (require 'bindat) | 93 | (require 'bindat) |
| 94 | (eval-when-compile (require 'pcase)) | 94 | (eval-when-compile (require 'pcase)) |
| 95 | (require 'subr-x) ; `string-pad' | ||
| 95 | 96 | ||
| 96 | (declare-function speedbar-change-initial-expansion-list | 97 | (declare-function speedbar-change-initial-expansion-list |
| 97 | "speedbar" (new-default)) | 98 | "speedbar" (new-default)) |
| @@ -2511,9 +2512,8 @@ means to decode using the coding-system set for the GDB process." | |||
| 2511 | ;; Record transactions if logging is enabled. | 2512 | ;; Record transactions if logging is enabled. |
| 2512 | (when gdb-enable-debug | 2513 | (when gdb-enable-debug |
| 2513 | (push (cons 'recv string) gdb-debug-log) | 2514 | (push (cons 'recv string) gdb-debug-log) |
| 2514 | (if (and gdb-debug-log-max | 2515 | (when gdb-debug-log-max |
| 2515 | (> (length gdb-debug-log) gdb-debug-log-max)) | 2516 | (setq gdb-debug-log (ntake gdb-debug-log-max gdb-debug-log)))) |
| 2516 | (setcdr (nthcdr (1- gdb-debug-log-max) gdb-debug-log) nil))) | ||
| 2517 | 2517 | ||
| 2518 | ;; Recall the left over gud-marker-acc from last time. | 2518 | ;; Recall the left over gud-marker-acc from last time. |
| 2519 | (setq gud-marker-acc (concat gud-marker-acc string)) | 2519 | (setq gud-marker-acc (concat gud-marker-acc string)) |
| @@ -2943,7 +2943,8 @@ Return position where LINE begins." | |||
| 2943 | start-posn))) | 2943 | start-posn))) |
| 2944 | 2944 | ||
| 2945 | (defun gdb-pad-string (string padding) | 2945 | (defun gdb-pad-string (string padding) |
| 2946 | (format (concat "%" (number-to-string padding) "s") string)) | 2946 | (declare (obsolete string-pad "29.1")) |
| 2947 | (string-pad string padding nil t)) | ||
| 2947 | 2948 | ||
| 2948 | ;; gdb-table struct is a way to programmatically construct simple | 2949 | ;; gdb-table struct is a way to programmatically construct simple |
| 2949 | ;; tables. It help to reliably align columns of data in GDB buffers | 2950 | ;; tables. It help to reliably align columns of data in GDB buffers |
| @@ -2985,13 +2986,13 @@ calling `gdb-table-string'." | |||
| 2985 | "Return TABLE as a string with columns separated with SEP." | 2986 | "Return TABLE as a string with columns separated with SEP." |
| 2986 | (let ((column-sizes (gdb-table-column-sizes table))) | 2987 | (let ((column-sizes (gdb-table-column-sizes table))) |
| 2987 | (mapconcat | 2988 | (mapconcat |
| 2988 | 'identity | 2989 | #'identity |
| 2989 | (cl-mapcar | 2990 | (cl-mapcar |
| 2990 | (lambda (row properties) | 2991 | (lambda (row properties) |
| 2991 | (apply 'propertize | 2992 | (apply #'propertize |
| 2992 | (mapconcat 'identity | 2993 | (mapconcat #'identity |
| 2993 | (cl-mapcar (lambda (s x) (gdb-pad-string s x)) | 2994 | (cl-mapcar (lambda (s x) (string-pad s x nil t)) |
| 2994 | row column-sizes) | 2995 | row column-sizes) |
| 2995 | sep) | 2996 | sep) |
| 2996 | properties)) | 2997 | properties)) |
| 2997 | (gdb-table-rows table) | 2998 | (gdb-table-rows table) |
| @@ -3688,10 +3689,11 @@ in `gdb-memory-format'." | |||
| 3688 | (dolist (row memory) | 3689 | (dolist (row memory) |
| 3689 | (insert (concat (gdb-mi--field row 'addr) ":")) | 3690 | (insert (concat (gdb-mi--field row 'addr) ":")) |
| 3690 | (dolist (column (gdb-mi--field row 'data)) | 3691 | (dolist (column (gdb-mi--field row 'data)) |
| 3691 | (insert (gdb-pad-string column | 3692 | (insert (string-pad column |
| 3692 | (+ 2 (gdb-memory-column-width | 3693 | (+ 2 (gdb-memory-column-width |
| 3693 | gdb-memory-unit | 3694 | gdb-memory-unit |
| 3694 | gdb-memory-format))))) | 3695 | gdb-memory-format)) |
| 3696 | nil t))) | ||
| 3695 | (newline))) | 3697 | (newline))) |
| 3696 | ;; Show last page instead of empty buffer when out of bounds | 3698 | ;; Show last page instead of empty buffer when out of bounds |
| 3697 | (when gdb-memory-last-address | 3699 | (when gdb-memory-last-address |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index be43effed7d..ccc57205757 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -1577,16 +1577,17 @@ into one that invokes an Emacs-enabled debugging session. | |||
| 1577 | (seen-e nil) | 1577 | (seen-e nil) |
| 1578 | (shift (lambda () (push (pop args) new-args)))) | 1578 | (shift (lambda () (push (pop args) new-args)))) |
| 1579 | 1579 | ||
| 1580 | ;; Pass all switches and -e scripts through. | 1580 | ;; Pass all switches and -E/-e scripts through. |
| 1581 | (while (and args | 1581 | (while (and args |
| 1582 | (string-match "^-" (car args)) | 1582 | (string-match "^-" (car args)) |
| 1583 | (not (equal "-" (car args))) | 1583 | (not (equal "-" (car args))) |
| 1584 | (not (equal "--" (car args)))) | 1584 | (not (equal "--" (car args)))) |
| 1585 | (when (equal "-e" (car args)) | 1585 | (when (or (equal "-E" (car args)) (equal "-e" (car args))) |
| 1586 | ;; -e goes with the next arg, so shift one extra. | 1586 | ;; -e goes with the next arg, so shift one extra. |
| 1587 | (or (funcall shift) | 1587 | (funcall shift) |
| 1588 | ;; -e as the last arg is an error in Perl. | 1588 | (or args |
| 1589 | (error "No code specified for -e")) | 1589 | ;; -E (or -e) as the last arg is an error in Perl. |
| 1590 | (error "No code specified for %s" (car new-args))) | ||
| 1590 | (setq seen-e t)) | 1591 | (setq seen-e t)) |
| 1591 | (funcall shift)) | 1592 | (funcall shift)) |
| 1592 | 1593 | ||
| @@ -1697,7 +1698,7 @@ The directory containing the perl program becomes the initial | |||
| 1697 | working directory and source-file directory for your debugger." | 1698 | working directory and source-file directory for your debugger." |
| 1698 | (interactive | 1699 | (interactive |
| 1699 | (list (gud-query-cmdline 'perldb | 1700 | (list (gud-query-cmdline 'perldb |
| 1700 | (concat (or (buffer-file-name) "-e 0") " ")))) | 1701 | (concat (or (buffer-file-name) "-E 0") " ")))) |
| 1701 | 1702 | ||
| 1702 | (gud-common-init command-line 'gud-perldb-massage-args | 1703 | (gud-common-init command-line 'gud-perldb-massage-args |
| 1703 | 'gud-perldb-marker-filter) | 1704 | 'gud-perldb-marker-filter) |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index d2c24a75810..efad3b52aa9 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -3490,9 +3490,10 @@ This function is intended for use in `after-change-functions'." | |||
| 3490 | 3490 | ||
| 3491 | ;;;###autoload | 3491 | ;;;###autoload |
| 3492 | (define-derived-mode js-json-mode js-mode "JSON" | 3492 | (define-derived-mode js-json-mode js-mode "JSON" |
| 3493 | ;; JSON files can be big. Speed up syntax-ppss. | 3493 | (setq-local js-enabled-frameworks nil) |
| 3494 | (setq-local syntax-propertize-function nil) | 3494 | ;; Speed up `syntax-ppss': JSON files can be big but can't hold |
| 3495 | (setq-local js-enabled-frameworks nil)) | 3495 | ;; regexp matchers nor #! thingies (and `js-enabled-frameworks' is nil). |
| 3496 | (setq-local syntax-propertize-function #'ignore)) | ||
| 3496 | 3497 | ||
| 3497 | ;; Since we made JSX support available and automatically-enabled in | 3498 | ;; Since we made JSX support available and automatically-enabled in |
| 3498 | ;; the base `js-mode' (for ease of use), now `js-jsx-mode' simply | 3499 | ;; the base `js-mode' (for ease of use), now `js-jsx-mode' simply |
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el index 7c9aee2b2a8..89482d86ce2 100644 --- a/lisp/progmodes/ps-mode.el +++ b/lisp/progmodes/ps-mode.el | |||
| @@ -34,7 +34,6 @@ | |||
| 34 | 34 | ||
| 35 | ;;; Code: | 35 | ;;; Code: |
| 36 | 36 | ||
| 37 | (defconst ps-mode-version "1.1i, 17 May 2008") | ||
| 38 | (defconst ps-mode-maintainer-address | 37 | (defconst ps-mode-maintainer-address |
| 39 | "Peter Kleiweg <p.c.j.kleiweg@rug.nl>, bug-gnu-emacs@gnu.org") | 38 | "Peter Kleiweg <p.c.j.kleiweg@rug.nl>, bug-gnu-emacs@gnu.org") |
| 40 | 39 | ||
| @@ -519,7 +518,7 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number | |||
| 519 | (defun ps-mode-show-version () | 518 | (defun ps-mode-show-version () |
| 520 | "Show current version of PostScript mode." | 519 | "Show current version of PostScript mode." |
| 521 | (interactive) | 520 | (interactive) |
| 522 | (message " *** PostScript Mode (ps-mode) Version %s *** " ps-mode-version)) | 521 | (message " *** PostScript Mode (ps-mode) in GNU Emacs %s *** " emacs-version)) |
| 523 | 522 | ||
| 524 | ;; From reporter.el | 523 | ;; From reporter.el |
| 525 | (defvar reporter-prompt-for-summary-p) | 524 | (defvar reporter-prompt-for-summary-p) |
| @@ -534,7 +533,7 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number | |||
| 534 | ps-run-font-lock-keywords-2))) | 533 | ps-run-font-lock-keywords-2))) |
| 535 | (reporter-submit-bug-report | 534 | (reporter-submit-bug-report |
| 536 | ps-mode-maintainer-address | 535 | ps-mode-maintainer-address |
| 537 | (format "ps-mode.el %s [%s]" ps-mode-version system-type) | 536 | (format "ps-mode.el %s [%s]" emacs-version system-type) |
| 538 | '(ps-mode-tab | 537 | '(ps-mode-tab |
| 539 | ps-mode-paper-size | 538 | ps-mode-paper-size |
| 540 | ps-mode-print-function | 539 | ps-mode-print-function |
| @@ -1094,6 +1093,9 @@ Use line numbers if `ps-run-error-line-numbers' is not nil." | |||
| 1094 | ;; | 1093 | ;; |
| 1095 | (add-hook 'kill-emacs-hook #'ps-run-cleanup) | 1094 | (add-hook 'kill-emacs-hook #'ps-run-cleanup) |
| 1096 | 1095 | ||
| 1096 | (defconst ps-mode-version "1.1i, 17 May 2008") | ||
| 1097 | (make-obsolete-variable 'ps-mode-version 'emacs-version "29.1") | ||
| 1098 | |||
| 1097 | (provide 'ps-mode) | 1099 | (provide 'ps-mode) |
| 1098 | 1100 | ||
| 1099 | ;;; ps-mode.el ends here | 1101 | ;;; ps-mode.el ends here |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index dad4c8ffbac..d67c34e11ab 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -8,21 +8,9 @@ | |||
| 8 | ;; Kenichi Handa <handa@gnu.org> (multi-byte characters) | 8 | ;; Kenichi Handa <handa@gnu.org> (multi-byte characters) |
| 9 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> | 9 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> |
| 10 | ;; Keywords: wp, print, PostScript | 10 | ;; Keywords: wp, print, PostScript |
| 11 | ;; Version: 7.3.5 | 11 | ;; Old-Version: 7.3.5 |
| 12 | ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 12 | ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 13 | 13 | ||
| 14 | (eval-when-compile (require 'cl-lib)) | ||
| 15 | |||
| 16 | (defconst ps-print-version "7.3.5" | ||
| 17 | "ps-print.el, v 7.3.5 <2009/12/23 vinicius> | ||
| 18 | |||
| 19 | Vinicius's last change version -- this file may have been edited as part of | ||
| 20 | Emacs without changes to the version number. When reporting bugs, please also | ||
| 21 | report the version of Emacs, if any, that ps-print was distributed with. | ||
| 22 | |||
| 23 | Please send all bug fixes and enhancements to | ||
| 24 | bug-gnu-emacs@gnu.org and Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.") | ||
| 25 | |||
| 26 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
| 27 | 15 | ||
| 28 | ;; GNU Emacs is free software: you can redistribute it and/or modify | 16 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| @@ -1320,11 +1308,11 @@ Please send all bug fixes and enhancements to | |||
| 1320 | ;; Known bugs and limitations of ps-print | 1308 | ;; Known bugs and limitations of ps-print |
| 1321 | ;; -------------------------------------- | 1309 | ;; -------------------------------------- |
| 1322 | ;; | 1310 | ;; |
| 1323 | ;; Automatic font-attribute detection doesn't work well, especially with | 1311 | ;; Automatic font-attribute detection doesn't work well. Users having |
| 1324 | ;; hilit19 and older versions of get-create-face. Users having problems with | 1312 | ;; problems with auto-font detection should use the lists |
| 1325 | ;; auto-font detection should use the lists `ps-italic-faces', `ps-bold-faces' | 1313 | ;; `ps-italic-faces', `ps-bold-faces' and `ps-underlined-faces' and/or |
| 1326 | ;; and `ps-underlined-faces' and/or turn off automatic detection by setting | 1314 | ;; turn off automatic detection by setting `ps-auto-font-detect' to |
| 1327 | ;; `ps-auto-font-detect' to nil. | 1315 | ;; nil. |
| 1328 | ;; | 1316 | ;; |
| 1329 | ;; Still too slow; could use some hand-optimization. | 1317 | ;; Still too slow; could use some hand-optimization. |
| 1330 | ;; | 1318 | ;; |
| @@ -1451,6 +1439,7 @@ Please send all bug fixes and enhancements to | |||
| 1451 | ;;; Code: | 1439 | ;;; Code: |
| 1452 | 1440 | ||
| 1453 | (require 'lpr) | 1441 | (require 'lpr) |
| 1442 | (eval-when-compile (require 'cl-lib)) | ||
| 1454 | 1443 | ||
| 1455 | ;; autoloads for secondary file | 1444 | ;; autoloads for secondary file |
| 1456 | (require 'ps-print-loaddefs) | 1445 | (require 'ps-print-loaddefs) |
| @@ -3596,7 +3585,6 @@ The table depends on the current ps-print setup." | |||
| 3596 | (mapconcat | 3585 | (mapconcat |
| 3597 | #'ps-print-quote | 3586 | #'ps-print-quote |
| 3598 | (list | 3587 | (list |
| 3599 | (concat "\n;;; (Emacs) ps-print version " ps-print-version "\n") | ||
| 3600 | ";; internal vars" | 3588 | ";; internal vars" |
| 3601 | (ps-comment-string "emacs-version " emacs-version) | 3589 | (ps-comment-string "emacs-version " emacs-version) |
| 3602 | (ps-comment-string "lpr-windows-system" lpr-windows-system) | 3590 | (ps-comment-string "lpr-windows-system" lpr-windows-system) |
| @@ -5347,7 +5335,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5347 | ps-adobe-tag | 5335 | ps-adobe-tag |
| 5348 | "%%Title: " (buffer-name) ; Take job name from name of | 5336 | "%%Title: " (buffer-name) ; Take job name from name of |
| 5349 | ; first buffer printed | 5337 | ; first buffer printed |
| 5350 | "\n%%Creator: ps-print v" ps-print-version | 5338 | "\n%%Creator: GNU Emacs " emacs-version |
| 5351 | "\n%%For: " (user-full-name) ;FIXME: may need encoding! | 5339 | "\n%%For: " (user-full-name) ;FIXME: may need encoding! |
| 5352 | "\n%%CreationDate: " (format-time-string "%T %b %d %Y") ;FIXME: encoding! | 5340 | "\n%%CreationDate: " (format-time-string "%T %b %d %Y") ;FIXME: encoding! |
| 5353 | "\n%%Orientation: " | 5341 | "\n%%Orientation: " |
| @@ -6548,6 +6536,17 @@ If FACE is not a valid face name, use default face." | |||
| 6548 | (unless noninteractive | 6536 | (unless noninteractive |
| 6549 | (add-hook 'kill-emacs-query-functions #'ps-kill-emacs-check)) | 6537 | (add-hook 'kill-emacs-query-functions #'ps-kill-emacs-check)) |
| 6550 | 6538 | ||
| 6539 | (defconst ps-print-version "7.3.5" | ||
| 6540 | "ps-print.el, v 7.3.5 <2009/12/23 vinicius> | ||
| 6541 | |||
| 6542 | Vinicius's last change version -- this file may have been edited as part of | ||
| 6543 | Emacs without changes to the version number. When reporting bugs, please also | ||
| 6544 | report the version of Emacs, if any, that ps-print was distributed with. | ||
| 6545 | |||
| 6546 | Please send all bug fixes and enhancements to | ||
| 6547 | bug-gnu-emacs@gnu.org and Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.") | ||
| 6548 | (make-obsolete-variable 'ps-print-version 'emacs-version "29.1") | ||
| 6549 | |||
| 6551 | (define-obsolete-function-alias 'ps-print-ensure-fontified #'font-lock-ensure "29.1") | 6550 | (define-obsolete-function-alias 'ps-print-ensure-fontified #'font-lock-ensure "29.1") |
| 6552 | 6551 | ||
| 6553 | (provide 'ps-print) | 6552 | (provide 'ps-print) |
diff --git a/lisp/select.el b/lisp/select.el index e407c224367..5b9cca80a38 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -673,9 +673,12 @@ two markers or an overlay. Otherwise, it is nil." | |||
| 673 | (let ((str (cond ((stringp value) value) | 673 | (let ((str (cond ((stringp value) value) |
| 674 | ((setq value (xselect--selection-bounds value)) | 674 | ((setq value (xselect--selection-bounds value)) |
| 675 | (with-current-buffer (nth 2 value) | 675 | (with-current-buffer (nth 2 value) |
| 676 | (buffer-substring (nth 0 value) | 676 | (when (and (>= (nth 0 value) (point-min)) |
| 677 | (nth 1 value))))))) | 677 | (<= (nth 1 value) (point-max))) |
| 678 | (xselect--encode-string type str t))) | 678 | (buffer-substring (nth 0 value) |
| 679 | (nth 1 value)))))))) | ||
| 680 | (when str | ||
| 681 | (xselect--encode-string type str t)))) | ||
| 679 | 682 | ||
| 680 | (defun xselect-convert-to-length (_selection _type value) | 683 | (defun xselect-convert-to-length (_selection _type value) |
| 681 | (let ((len (cond ((stringp value) | 684 | (let ((len (cond ((stringp value) |
diff --git a/lisp/simple.el b/lisp/simple.el index a4ea345ca5f..1e6e5e11e00 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6731,7 +6731,8 @@ If Transient Mark mode is disabled, this function normally does | |||
| 6731 | nothing; but if FORCE is non-nil, it deactivates the mark anyway. | 6731 | nothing; but if FORCE is non-nil, it deactivates the mark anyway. |
| 6732 | 6732 | ||
| 6733 | Deactivating the mark sets `mark-active' to nil, updates the | 6733 | Deactivating the mark sets `mark-active' to nil, updates the |
| 6734 | primary selection according to `select-active-regions', and runs | 6734 | primary selection according to `select-active-regions' (unless |
| 6735 | `deactivate-mark' is `dont-save'), and runs | ||
| 6735 | `deactivate-mark-hook'. | 6736 | `deactivate-mark-hook'. |
| 6736 | 6737 | ||
| 6737 | If Transient Mark mode was temporarily enabled, reset the value | 6738 | If Transient Mark mode was temporarily enabled, reset the value |
| @@ -6742,6 +6743,7 @@ run `deactivate-mark-hook'." | |||
| 6742 | (when (and (if (eq select-active-regions 'only) | 6743 | (when (and (if (eq select-active-regions 'only) |
| 6743 | (eq (car-safe transient-mark-mode) 'only) | 6744 | (eq (car-safe transient-mark-mode) 'only) |
| 6744 | select-active-regions) | 6745 | select-active-regions) |
| 6746 | (not (eq deactivate-mark 'dont-save)) | ||
| 6745 | (region-active-p) | 6747 | (region-active-p) |
| 6746 | (display-selections-p)) | 6748 | (display-selections-p)) |
| 6747 | ;; The var `saved-region-selection', if non-nil, is the text in | 6749 | ;; The var `saved-region-selection', if non-nil, is the text in |
| @@ -7690,11 +7692,33 @@ not vscroll." | |||
| 7690 | ;; But don't vscroll in a keyboard macro. | 7692 | ;; But don't vscroll in a keyboard macro. |
| 7691 | (not defining-kbd-macro) | 7693 | (not defining-kbd-macro) |
| 7692 | (not executing-kbd-macro) | 7694 | (not executing-kbd-macro) |
| 7695 | ;; Lines are not truncated... | ||
| 7696 | (not | ||
| 7697 | (and | ||
| 7698 | (or truncate-lines | ||
| 7699 | (and (integerp truncate-partial-width-windows) | ||
| 7700 | (< (window-total-width) | ||
| 7701 | truncate-partial-width-windows)) | ||
| 7702 | (and truncate-partial-width-windows | ||
| 7703 | (not (integerp truncate-partial-width-windows)) | ||
| 7704 | (not (window-full-width-p)))) | ||
| 7705 | ;; ...or if lines are truncated, this buffer | ||
| 7706 | ;; doesn't have very long lines. | ||
| 7707 | (long-line-optimizations-p))) | ||
| 7693 | (line-move-partial arg noerror)) | 7708 | (line-move-partial arg noerror)) |
| 7694 | (set-window-vscroll nil 0 t) | 7709 | (set-window-vscroll nil 0 t) |
| 7695 | (if (and line-move-visual | 7710 | (if (and line-move-visual |
| 7696 | ;; Display-based column are incompatible with goal-column. | 7711 | ;; Display-based column are incompatible with goal-column. |
| 7697 | (not goal-column) | 7712 | (not goal-column) |
| 7713 | ;; Lines aren't truncated. | ||
| 7714 | (not | ||
| 7715 | (or truncate-lines | ||
| 7716 | (and (integerp truncate-partial-width-windows) | ||
| 7717 | (< (window-width) | ||
| 7718 | truncate-partial-width-windows)) | ||
| 7719 | (and truncate-partial-width-windows | ||
| 7720 | (not (integerp truncate-partial-width-windows)) | ||
| 7721 | (not (window-full-width-p))))) | ||
| 7698 | ;; When the text in the window is scrolled to the left, | 7722 | ;; When the text in the window is scrolled to the left, |
| 7699 | ;; display-based motion doesn't make sense (because each | 7723 | ;; display-based motion doesn't make sense (because each |
| 7700 | ;; logical line occupies exactly one screen line). | 7724 | ;; logical line occupies exactly one screen line). |
| @@ -8131,10 +8155,11 @@ For motion by visual lines, see `beginning-of-visual-line'." | |||
| 8131 | (line-move (1- arg) t))) | 8155 | (line-move (1- arg) t))) |
| 8132 | 8156 | ||
| 8133 | ;; Move to beginning-of-line, ignoring fields and invisible text. | 8157 | ;; Move to beginning-of-line, ignoring fields and invisible text. |
| 8134 | (skip-chars-backward "^\n") | 8158 | (let ((inhibit-field-text-motion t)) |
| 8135 | (while (and (not (bobp)) (invisible-p (1- (point)))) | 8159 | (goto-char (line-beginning-position)) |
| 8136 | (goto-char (previous-char-property-change (point))) | 8160 | (while (and (not (bobp)) (invisible-p (1- (point)))) |
| 8137 | (skip-chars-backward "^\n")) | 8161 | (goto-char (previous-char-property-change (point))) |
| 8162 | (goto-char (line-beginning-position)))) | ||
| 8138 | 8163 | ||
| 8139 | ;; Now find first visible char in the line. | 8164 | ;; Now find first visible char in the line. |
| 8140 | (while (and (< (point) orig) (invisible-p (point))) | 8165 | (while (and (< (point) orig) (invisible-p (point))) |
diff --git a/lisp/subr.el b/lisp/subr.el index 4b1fc832da1..42ce9148a90 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -4077,6 +4077,12 @@ Otherwise, return nil." | |||
| 4077 | (or (eq 'macro (car def)) | 4077 | (or (eq 'macro (car def)) |
| 4078 | (and (autoloadp def) (memq (nth 4 def) '(macro t))))))) | 4078 | (and (autoloadp def) (memq (nth 4 def) '(macro t))))))) |
| 4079 | 4079 | ||
| 4080 | (defun compiled-function-p (object) | ||
| 4081 | "Return non-nil if OBJECT is a function that has been compiled. | ||
| 4082 | Does not distinguish between functions implemented in machine code | ||
| 4083 | or byte-code." | ||
| 4084 | (or (subrp object) (byte-code-function-p object))) | ||
| 4085 | |||
| 4080 | (defun field-at-pos (pos) | 4086 | (defun field-at-pos (pos) |
| 4081 | "Return the field at position POS, taking stickiness etc into account." | 4087 | "Return the field at position POS, taking stickiness etc into account." |
| 4082 | (let ((raw-field (get-char-property (field-beginning pos) 'field))) | 4088 | (let ((raw-field (get-char-property (field-beginning pos) 'field))) |
diff --git a/lisp/textmodes/emacs-authors-mode.el b/lisp/textmodes/emacs-authors-mode.el new file mode 100644 index 00000000000..af78ab605e9 --- /dev/null +++ b/lisp/textmodes/emacs-authors-mode.el | |||
| @@ -0,0 +1,145 @@ | |||
| 1 | ;;; emacs-authors-mode.el --- font-locking for etc/AUTHORS -*- lexical-binding: t -*- | ||
| 2 | |||
| 3 | ;; Copyright (C) 2021-2022 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Stefan Kangas <stefan@marxist.se> | ||
| 6 | ;; Keywords: internal | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;; Major mode to display the etc/AUTHORS file from the Emacs | ||
| 26 | ;; distribution. Provides some basic font locking and not much else. | ||
| 27 | |||
| 28 | ;;; Code: | ||
| 29 | |||
| 30 | (require 'subr-x) ; `emacs-etc--hide-local-variables' | ||
| 31 | |||
| 32 | (defgroup emacs-authors-mode nil | ||
| 33 | "Display the \"etc/AUTHORS\" file from the Emacs distribution." | ||
| 34 | :version "29.1" | ||
| 35 | :group 'internal) | ||
| 36 | |||
| 37 | (defface emacs-authors-default | ||
| 38 | '((t :inherit variable-pitch)) | ||
| 39 | "Default face used to display the \"etc/AUTHORS\" file. | ||
| 40 | See also `emacs-authors-mode'." | ||
| 41 | :version "29.1") | ||
| 42 | |||
| 43 | (defface emacs-authors-author | ||
| 44 | '((((class color) (min-colors 88) (background light)) | ||
| 45 | :foreground "midnight blue" | ||
| 46 | :weight bold :height 1.05 | ||
| 47 | :inherit variable-pitch) | ||
| 48 | (((class color) (min-colors 88) (background dark)) | ||
| 49 | :foreground "cyan" | ||
| 50 | :weight bold :height 1.05 | ||
| 51 | :inherit variable-pitch) | ||
| 52 | (((supports :weight bold) (supports :height 1.05)) | ||
| 53 | :weight bold :height 1.05 | ||
| 54 | :inherit variable-pitch) | ||
| 55 | (((supports :weight bold)) | ||
| 56 | :weight bold :inherit variable-pitch) | ||
| 57 | (t :inherit variable-pitch)) | ||
| 58 | "Face used for the author in the \"etc/AUTHORS\" file. | ||
| 59 | See also `emacs-authors-mode'." | ||
| 60 | :version "29.1") | ||
| 61 | |||
| 62 | (defface emacs-authors-descriptor | ||
| 63 | '((((class color) (min-colors 88) (background light)) | ||
| 64 | :foreground "sienna" :inherit variable-pitch) | ||
| 65 | (((class color) (min-colors 88) (background dark)) | ||
| 66 | :foreground "peru" :inherit variable-pitch) | ||
| 67 | (t :inherit variable-pitch)) | ||
| 68 | "Face used for the description text in the \"etc/AUTHORS\" file. | ||
| 69 | See also `emacs-authors-mode'." | ||
| 70 | :version "29.1") | ||
| 71 | |||
| 72 | (defface emacs-authors-other-files | ||
| 73 | '((t :inherit emacs-authors-descriptor)) | ||
| 74 | "Face used for the \"other files\" text in the \"etc/AUTHORS\" file. | ||
| 75 | See also `emacs-authors-mode'." | ||
| 76 | :version "29.1") | ||
| 77 | |||
| 78 | (defconst emacs-authors--author-re | ||
| 79 | (rx bol (group (not (any blank "\n")) (+? (not (any ":" "\n")))) ":") | ||
| 80 | "Regexp matching an author in \"etc/AUTHORS\".") | ||
| 81 | |||
| 82 | (defvar emacs-authors-mode-font-lock-keywords | ||
| 83 | `((,emacs-authors--author-re | ||
| 84 | 1 'emacs-authors-author) | ||
| 85 | (,(rx (or "wrote" | ||
| 86 | (seq (? "and ") (or "co-wrote" "changed")))) | ||
| 87 | 0 'emacs-authors-descriptor) | ||
| 88 | (,(rx "and " (+ digit) " other files") | ||
| 89 | 0 'emacs-authors-other-files) | ||
| 90 | (,(rx bol (not space) (+ not-newline) eol) | ||
| 91 | 0 'emacs-authors-default))) | ||
| 92 | |||
| 93 | (defun emacs-authors-next-author (&optional arg) | ||
| 94 | "Move point to the next author in \"etc/AUTHORS\". | ||
| 95 | With a prefix arg ARG, move point that many authors forward." | ||
| 96 | (interactive "p" emacs-authors-mode) | ||
| 97 | (if (< 0 arg) | ||
| 98 | (progn | ||
| 99 | (when (looking-at emacs-authors--author-re) | ||
| 100 | (forward-line 1)) | ||
| 101 | (re-search-forward emacs-authors--author-re nil t arg)) | ||
| 102 | (when (looking-at emacs-authors--author-re) | ||
| 103 | (forward-line -1)) | ||
| 104 | (re-search-backward emacs-authors--author-re nil t (abs arg))) | ||
| 105 | (goto-char (line-beginning-position))) | ||
| 106 | |||
| 107 | (defun emacs-authors-prev-author (&optional arg) | ||
| 108 | "Move point to the previous author in \"etc/AUTHORS\". | ||
| 109 | With a prefix arg ARG, move point that many authors backward." | ||
| 110 | (interactive "p" emacs-authors-mode) | ||
| 111 | (emacs-authors-next-author (- arg))) | ||
| 112 | |||
| 113 | (defvar emacs-authors-imenu-generic-expression | ||
| 114 | `((nil ,(rx bol (group (+ (not ":"))) ": " | ||
| 115 | (or "wrote" "co-wrote" "changed") | ||
| 116 | " ") | ||
| 117 | 1))) | ||
| 118 | |||
| 119 | (define-obsolete-variable-alias 'etc-authors-mode-map 'emacs-authors-mode-map "29.1") | ||
| 120 | (defvar-keymap emacs-authors-mode-map | ||
| 121 | :doc "Keymap for `emacs-authors-mode'." | ||
| 122 | "n" #'emacs-authors-next-author | ||
| 123 | "p" #'emacs-authors-prev-author) | ||
| 124 | |||
| 125 | ;;;###autoload | ||
| 126 | (define-derived-mode emacs-authors-mode special-mode "Authors View" | ||
| 127 | "Major mode for viewing \"etc/AUTHORS\" from the Emacs distribution. | ||
| 128 | Provides some basic font locking and not much else." | ||
| 129 | (setq-local font-lock-defaults | ||
| 130 | '(emacs-authors-mode-font-lock-keywords nil nil ((?_ . "w")))) | ||
| 131 | (setq font-lock-multiline nil) | ||
| 132 | (setq imenu-generic-expression emacs-authors-imenu-generic-expression) | ||
| 133 | (emacs-etc--hide-local-variables)) | ||
| 134 | |||
| 135 | (define-obsolete-face-alias 'etc-authors-default 'emacs-authors-default "29.1") | ||
| 136 | (define-obsolete-face-alias 'etc-authors-author 'emacs-authors-author "29.1") | ||
| 137 | (define-obsolete-face-alias 'etc-authors-descriptor 'emacs-authors-descriptor "29.1") | ||
| 138 | (define-obsolete-face-alias 'etc-authors-other-files 'emacs-authors-other-files "29.1") | ||
| 139 | (define-obsolete-function-alias 'etc-authors-next-author #'emacs-authors-next-author "29.1") | ||
| 140 | (define-obsolete-function-alias 'etc-authors-prev-author #'emacs-authors-prev-author "29.1") | ||
| 141 | ;;;###autoload | ||
| 142 | (define-obsolete-function-alias 'etc-authors-mode #'emacs-authors-mode "29.1") | ||
| 143 | |||
| 144 | (provide 'emacs-authors-mode) | ||
| 145 | ;;; emacs-authors-mode.el ends here | ||
diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index e6e1f037284..022e17c9343 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | (eval-when-compile (require 'cl-lib)) | 26 | (eval-when-compile (require 'cl-lib)) |
| 27 | (require 'outline) | 27 | (require 'outline) |
| 28 | (require 'subr-x) ; `emacs-etc--hide-local-variables' | ||
| 28 | 29 | ||
| 29 | (defgroup emacs-news-mode nil | 30 | (defgroup emacs-news-mode nil |
| 30 | "Major mode for editing and viewing the Emacs NEWS file." | 31 | "Major mode for editing and viewing the Emacs NEWS file." |
| @@ -59,9 +60,12 @@ | |||
| 59 | "C-x C-q" #'emacs-news-view-mode | 60 | "C-x C-q" #'emacs-news-view-mode |
| 60 | "<remap> <open-line>" #'emacs-news-open-line) | 61 | "<remap> <open-line>" #'emacs-news-open-line) |
| 61 | 62 | ||
| 62 | (defvar-keymap emacs-news-view-mode-map | 63 | (defvar emacs-news-view-mode-map |
| 63 | :parent emacs-news-common-map | 64 | ;; This is defined this way instead of inheriting because we're |
| 64 | "C-x C-q" #'emacs-news-mode) | 65 | ;; deriving the mode from `special-mode' and want the keys from there. |
| 66 | (let ((map (copy-keymap emacs-news-common-map))) | ||
| 67 | (keymap-set map "C-x C-q" #'emacs-news-mode) | ||
| 68 | map)) | ||
| 65 | 69 | ||
| 66 | (defvar emacs-news-mode-font-lock-keywords | 70 | (defvar emacs-news-mode-font-lock-keywords |
| 67 | `(("^---$" 0 'emacs-news-does-not-need-documentation) | 71 | `(("^---$" 0 'emacs-news-does-not-need-documentation) |
| @@ -73,7 +77,8 @@ | |||
| 73 | outline-minor-mode-cycle t | 77 | outline-minor-mode-cycle t |
| 74 | outline-level (lambda () (length (match-string 2))) | 78 | outline-level (lambda () (length (match-string 2))) |
| 75 | outline-minor-mode-highlight 'append) | 79 | outline-minor-mode-highlight 'append) |
| 76 | (outline-minor-mode)) | 80 | (outline-minor-mode) |
| 81 | (emacs-etc--hide-local-variables)) | ||
| 77 | 82 | ||
| 78 | ;;;###autoload | 83 | ;;;###autoload |
| 79 | (define-derived-mode emacs-news-mode text-mode "NEWS" | 84 | (define-derived-mode emacs-news-mode text-mode "NEWS" |
diff --git a/lisp/textmodes/etc-authors-mode.el b/lisp/textmodes/etc-authors-mode.el deleted file mode 100644 index 7eabdd4c2b8..00000000000 --- a/lisp/textmodes/etc-authors-mode.el +++ /dev/null | |||
| @@ -1,133 +0,0 @@ | |||
| 1 | ;;; etc-authors-mode.el --- font-locking for etc/AUTHORS -*- lexical-binding: t -*- | ||
| 2 | |||
| 3 | ;; Copyright (C) 2021-2022 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Stefan Kangas <stefan@marxist.se> | ||
| 6 | ;; Keywords: internal | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;; Major mode to display the etc/AUTHORS file from the Emacs | ||
| 26 | ;; distribution. Provides some basic font locking and not much else. | ||
| 27 | |||
| 28 | ;;; Code: | ||
| 29 | |||
| 30 | (defgroup etc-authors-mode nil | ||
| 31 | "Display the \"etc/AUTHORS\" file from the Emacs distribution." | ||
| 32 | :version "28.1" | ||
| 33 | :group 'internal) | ||
| 34 | |||
| 35 | (defface etc-authors-default '((t :inherit variable-pitch)) | ||
| 36 | "Default face used to display the \"etc/AUTHORS\" file. | ||
| 37 | See also `etc-authors-mode'." | ||
| 38 | :version "28.1") | ||
| 39 | |||
| 40 | (defface etc-authors-author '((((class color) (min-colors 88) (background light)) | ||
| 41 | :foreground "midnight blue" | ||
| 42 | :weight bold :height 1.05 | ||
| 43 | :inherit variable-pitch) | ||
| 44 | (((class color) (min-colors 88) (background dark)) | ||
| 45 | :foreground "cyan" | ||
| 46 | :weight bold :height 1.05 | ||
| 47 | :inherit variable-pitch) | ||
| 48 | (((supports :weight bold) (supports :height 1.05)) | ||
| 49 | :weight bold :height 1.05 | ||
| 50 | :inherit variable-pitch) | ||
| 51 | (((supports :weight bold)) | ||
| 52 | :weight bold :inherit variable-pitch) | ||
| 53 | (t :inherit variable-pitch)) | ||
| 54 | "Face used for the author in the \"etc/AUTHORS\" file. | ||
| 55 | See also `etc-authors-mode'." | ||
| 56 | :version "28.1") | ||
| 57 | |||
| 58 | (defface etc-authors-descriptor '((((class color) (min-colors 88) (background light)) | ||
| 59 | :foreground "sienna" :inherit variable-pitch) | ||
| 60 | (((class color) (min-colors 88) (background dark)) | ||
| 61 | :foreground "peru" :inherit variable-pitch) | ||
| 62 | (t :inherit variable-pitch)) | ||
| 63 | "Face used for the description text in the \"etc/AUTHORS\" file. | ||
| 64 | See also `etc-authors-mode'." | ||
| 65 | :version "28.1") | ||
| 66 | |||
| 67 | (defface etc-authors-other-files '((t :inherit etc-authors-descriptor)) | ||
| 68 | "Face used for the \"other files\" text in the \"etc/AUTHORS\" file. | ||
| 69 | See also `etc-authors-mode'." | ||
| 70 | :version "28.1") | ||
| 71 | |||
| 72 | (defconst etc-authors--author-re | ||
| 73 | (rx bol (group (not (any blank "\n")) (+? (not (any ":" "\n")))) ":") | ||
| 74 | "Regexp matching an author in \"etc/AUTHORS\".") | ||
| 75 | |||
| 76 | (defvar etc-authors-mode-font-lock-keywords | ||
| 77 | `((,etc-authors--author-re | ||
| 78 | 1 'etc-authors-author) | ||
| 79 | (,(rx (or "wrote" | ||
| 80 | (seq (? "and ") (or "co-wrote" "changed")))) | ||
| 81 | 0 'etc-authors-descriptor) | ||
| 82 | (,(rx "and " (+ digit) " other files") | ||
| 83 | 0 'etc-authors-other-files) | ||
| 84 | (,(rx bol (not space) (+ not-newline) eol) | ||
| 85 | 0 'etc-authors-default))) | ||
| 86 | |||
| 87 | (defun etc-authors-mode--hide-local-variables () | ||
| 88 | "Hide local variables in \"etc/AUTHORS\". Used by `etc-authors-mode'." | ||
| 89 | (narrow-to-region (point-min) | ||
| 90 | (save-excursion | ||
| 91 | (goto-char (point-min)) | ||
| 92 | ;; Obfuscate to avoid this being interpreted | ||
| 93 | ;; as a local variable section itself. | ||
| 94 | (if (re-search-forward "^Local\sVariables:$" nil t) | ||
| 95 | (progn (forward-line -1) (point)) | ||
| 96 | (point-max))))) | ||
| 97 | |||
| 98 | (defun etc-authors-next-author (&optional arg) | ||
| 99 | "Move point to the next author in \"etc/AUTHORS\". | ||
| 100 | With a prefix arg ARG, move point that many authors forward." | ||
| 101 | (interactive "p" etc-authors-mode) | ||
| 102 | (if (< 0 arg) | ||
| 103 | (progn | ||
| 104 | (when (looking-at etc-authors--author-re) | ||
| 105 | (forward-line 1)) | ||
| 106 | (re-search-forward etc-authors--author-re nil t arg)) | ||
| 107 | (when (looking-at etc-authors--author-re) | ||
| 108 | (forward-line -1)) | ||
| 109 | (re-search-backward etc-authors--author-re nil t (abs arg))) | ||
| 110 | (goto-char (line-beginning-position))) | ||
| 111 | |||
| 112 | (defun etc-authors-prev-author (&optional arg) | ||
| 113 | "Move point to the previous author in \"etc/AUTHORS\". | ||
| 114 | With a prefix arg ARG, move point that many authors backward." | ||
| 115 | (interactive "p" etc-authors-mode) | ||
| 116 | (etc-authors-next-author (- arg))) | ||
| 117 | |||
| 118 | (defvar-keymap etc-authors-mode-map | ||
| 119 | :doc "Keymap for `etc-authors-mode'." | ||
| 120 | "n" #'etc-authors-next-author | ||
| 121 | "p" #'etc-authors-prev-author) | ||
| 122 | |||
| 123 | ;;;###autoload | ||
| 124 | (define-derived-mode etc-authors-mode special-mode "Authors View" | ||
| 125 | "Major mode for viewing \"etc/AUTHORS\" from the Emacs distribution. | ||
| 126 | Provides some basic font locking and not much else." | ||
| 127 | (setq-local font-lock-defaults | ||
| 128 | '(etc-authors-mode-font-lock-keywords nil nil ((?_ . "w")))) | ||
| 129 | (setq font-lock-multiline nil) | ||
| 130 | (etc-authors-mode--hide-local-variables)) | ||
| 131 | |||
| 132 | (provide 'etc-authors-mode) | ||
| 133 | ;;; etc-authors-mode.el ends here | ||
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index a7c86fb24f0..462f87d3c1a 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el | |||
| @@ -74,7 +74,7 @@ question. | |||
| 74 | 74 | ||
| 75 | \"things\" include `symbol', `list', `sexp', `defun', `filename', | 75 | \"things\" include `symbol', `list', `sexp', `defun', `filename', |
| 76 | `existing-filename', `url', `email', `uuid', `word', `sentence', | 76 | `existing-filename', `url', `email', `uuid', `word', `sentence', |
| 77 | `whitespace', `line', and `page'.") | 77 | `whitespace', `line', `face' and `page'.") |
| 78 | 78 | ||
| 79 | ;; Basic movement | 79 | ;; Basic movement |
| 80 | 80 | ||
| @@ -166,7 +166,7 @@ positions of the thing found." | |||
| 166 | THING should be a symbol specifying a type of syntactic entity. | 166 | THING should be a symbol specifying a type of syntactic entity. |
| 167 | Possibilities include `symbol', `list', `sexp', `defun', | 167 | Possibilities include `symbol', `list', `sexp', `defun', |
| 168 | `filename', `existing-filename', `url', `email', `uuid', `word', | 168 | `filename', `existing-filename', `url', `email', `uuid', `word', |
| 169 | `sentence', `whitespace', `line', `number', and `page'. | 169 | `sentence', `whitespace', `line', `number', `face' and `page'. |
| 170 | 170 | ||
| 171 | When the optional argument NO-PROPERTIES is non-nil, | 171 | When the optional argument NO-PROPERTIES is non-nil, |
| 172 | strip text properties from the return value. | 172 | strip text properties from the return value. |
| @@ -361,6 +361,15 @@ E.g.: | |||
| 361 | 361 | ||
| 362 | (put 'existing-filename 'thing-at-point 'thing-at-point-file-at-point) | 362 | (put 'existing-filename 'thing-at-point 'thing-at-point-file-at-point) |
| 363 | 363 | ||
| 364 | ;; Faces | ||
| 365 | |||
| 366 | (defun thing-at-point-face-at-point (&optional _lax _bounds) | ||
| 367 | "Return the name of the face at point as a symbol." | ||
| 368 | (when-let ((face (thing-at-point 'symbol))) | ||
| 369 | (and (facep face) (intern face)))) | ||
| 370 | |||
| 371 | (put 'face 'thing-at-point 'thing-at-point-face-at-point) | ||
| 372 | |||
| 364 | ;; URIs | 373 | ;; URIs |
| 365 | 374 | ||
| 366 | (defvar thing-at-point-beginning-of-url-regexp nil | 375 | (defvar thing-at-point-beginning-of-url-regexp nil |
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index e02d84f1f56..d710578ffff 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el | |||
| @@ -568,14 +568,12 @@ Compatibility function for \\[next-error] invocations." | |||
| 568 | ;; Select window displaying source file. | 568 | ;; Select window displaying source file. |
| 569 | (select-window change-log-find-window))))) | 569 | (select-window change-log-find-window))))) |
| 570 | 570 | ||
| 571 | (defvar change-log-mode-map | 571 | (defvar-keymap change-log-mode-map |
| 572 | (let ((map (make-sparse-keymap))) | 572 | :doc "Keymap for Change Log major mode." |
| 573 | (define-key map [?\C-c ?\C-p] #'add-log-edit-prev-comment) | 573 | "C-c C-p" #'add-log-edit-prev-comment |
| 574 | (define-key map [?\C-c ?\C-n] #'add-log-edit-next-comment) | 574 | "C-c C-n" #'add-log-edit-next-comment |
| 575 | (define-key map [?\C-c ?\C-f] #'change-log-find-file) | 575 | "C-c C-f" #'change-log-find-file |
| 576 | (define-key map [?\C-c ?\C-c] #'change-log-goto-source) | 576 | "C-c C-c" #'change-log-goto-source) |
| 577 | map) | ||
| 578 | "Keymap for Change Log major mode.") | ||
| 579 | 577 | ||
| 580 | (easy-menu-define change-log-mode-menu change-log-mode-map | 578 | (easy-menu-define change-log-mode-menu change-log-mode-map |
| 581 | "Menu for Change Log major mode." | 579 | "Menu for Change Log major mode." |
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index aa426446d73..e4a1996c1bb 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -27,8 +27,8 @@ | |||
| 27 | ;; to the corresponding source file. | 27 | ;; to the corresponding source file. |
| 28 | 28 | ||
| 29 | ;; Inspired by Pavel Machek's patch-mode.el (<pavel@@atrey.karlin.mff.cuni.cz>) | 29 | ;; Inspired by Pavel Machek's patch-mode.el (<pavel@@atrey.karlin.mff.cuni.cz>) |
| 30 | ;; Some efforts were spent to have it somewhat compatible with XEmacs's | 30 | ;; Some efforts were spent to have it somewhat compatible with |
| 31 | ;; diff-mode as well as with compilation-minor-mode | 31 | ;; `compilation-minor-mode'. |
| 32 | 32 | ||
| 33 | ;; Bugs: | 33 | ;; Bugs: |
| 34 | 34 | ||
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 7e15060f8c4..52e356d8e9b 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el | |||
| @@ -144,20 +144,18 @@ Useful commands (type ? to hide them and free up screen): | |||
| 144 | 144 | ||
| 145 | (ediff-defvar-local ediff-meta-buffer-map nil | 145 | (ediff-defvar-local ediff-meta-buffer-map nil |
| 146 | "The keymap for the meta buffer.") | 146 | "The keymap for the meta buffer.") |
| 147 | (defvar ediff-dir-diffs-buffer-map | 147 | (defvar-keymap ediff-dir-diffs-buffer-map |
| 148 | (let ((map (make-sparse-keymap))) | 148 | :doc "Keymap for buffer showing differences between directories." |
| 149 | (suppress-keymap map) | 149 | :suppress t |
| 150 | (define-key map "q" #'ediff-bury-dir-diffs-buffer) | 150 | "q" #'ediff-bury-dir-diffs-buffer |
| 151 | (define-key map " " #'next-line) | 151 | "SPC" #'next-line |
| 152 | (define-key map "n" #'next-line) | 152 | "n" #'next-line |
| 153 | (define-key map "\C-?" #'previous-line) | 153 | "DEL" #'previous-line |
| 154 | (define-key map "p" #'previous-line) | 154 | "p" #'previous-line |
| 155 | (define-key map "C" #'ediff-dir-diff-copy-file) | 155 | "C" #'ediff-dir-diff-copy-file |
| 156 | (define-key map [mouse-2] #'ediff-dir-diff-copy-file) | 156 | "<mouse-2>" #'ediff-dir-diff-copy-file |
| 157 | (define-key map [delete] #'previous-line) | 157 | "<delete>" #'previous-line |
| 158 | (define-key map [backspace] #'previous-line) | 158 | "<backspace>" #'previous-line) |
| 159 | map) | ||
| 160 | "Keymap for buffer showing differences between directories.") | ||
| 161 | 159 | ||
| 162 | ;; Variable specifying the action to take when the use invokes ediff in the | 160 | ;; Variable specifying the action to take when the use invokes ediff in the |
| 163 | ;; meta buffer. This is usually ediff-registry-action or ediff-filegroup-action | 161 | ;; meta buffer. This is usually ediff-registry-action or ediff-filegroup-action |
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 84ad5cef90f..94e3fc6d7fe 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el | |||
| @@ -89,12 +89,11 @@ | |||
| 89 | ;; underlining. However, if the region is already underlined by some other | 89 | ;; underlining. However, if the region is already underlined by some other |
| 90 | ;; overlays, there is no simple way to temporarily remove that residual | 90 | ;; overlays, there is no simple way to temporarily remove that residual |
| 91 | ;; underlining. This problem occurs when a buffer is highlighted with | 91 | ;; underlining. This problem occurs when a buffer is highlighted with |
| 92 | ;; hilit19.el or font-lock.el packages. If this residual highlighting gets | 92 | ;; font-lock.el packages. If this residual highlighting gets in the way, you |
| 93 | ;; in the way, you can do the following. Both font-lock.el and hilit19.el | 93 | ;; can do the following. font-lock.el provides commands for unhighlighting |
| 94 | ;; provide commands for unhighlighting buffers. You can either place these | 94 | ;; buffers. You can either place these commands in `ediff-prepare-buffer-hook' |
| 95 | ;; commands in `ediff-prepare-buffer-hook' (which will unhighlight every | 95 | ;; (which will unhighlight every buffer used by Ediff) or you can execute |
| 96 | ;; buffer used by Ediff) or you can execute them interactively, at any time | 96 | ;; them interactively, at any time and in any buffer. |
| 97 | ;; and on any buffer. | ||
| 98 | 97 | ||
| 99 | 98 | ||
| 100 | ;;; Acknowledgments: | 99 | ;;; Acknowledgments: |
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el index 422ed5c0a4d..de09be80e7c 100644 --- a/lisp/vc/emerge.el +++ b/lisp/vc/emerge.el | |||
| @@ -2942,6 +2942,7 @@ If some prefix of KEY has a non-prefix definition, it is redefined." | |||
| 2942 | 2942 | ||
| 2943 | ;; Define a key if it (or a prefix) is not already defined in the map. | 2943 | ;; Define a key if it (or a prefix) is not already defined in the map. |
| 2944 | (defun emerge-define-key-if-possible (keymap key definition) | 2944 | (defun emerge-define-key-if-possible (keymap key definition) |
| 2945 | (declare (obsolete keymap-set "29.1")) | ||
| 2945 | ;; look up the present definition of the key | 2946 | ;; look up the present definition of the key |
| 2946 | (let ((present (lookup-key keymap key))) | 2947 | (let ((present (lookup-key keymap key))) |
| 2947 | (if (integerp present) | 2948 | (if (integerp present) |
| @@ -2959,6 +2960,7 @@ If some prefix of KEY has a non-prefix definition, it is redefined." | |||
| 2959 | If the name won't fit on one line, the minibuffer is expanded to hold it, | 2960 | If the name won't fit on one line, the minibuffer is expanded to hold it, |
| 2960 | and the command waits for a keystroke from the user. If the keystroke is | 2961 | and the command waits for a keystroke from the user. If the keystroke is |
| 2961 | SPC, it is ignored; if it is anything else, it is processed as a command." | 2962 | SPC, it is ignored; if it is anything else, it is processed as a command." |
| 2963 | (declare (obsolete nil "29.1")) | ||
| 2962 | (interactive) | 2964 | (interactive) |
| 2963 | (let ((name (buffer-file-name))) | 2965 | (let ((name (buffer-file-name))) |
| 2964 | (or name | 2966 | (or name |
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 1f19c4cfe26..a15cf417de3 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el | |||
| @@ -162,22 +162,20 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." | |||
| 162 | :type '(repeat number) | 162 | :type '(repeat number) |
| 163 | :group 'vc) | 163 | :group 'vc) |
| 164 | 164 | ||
| 165 | (defvar vc-annotate-mode-map | 165 | (defvar-keymap vc-annotate-mode-map |
| 166 | (let ((m (make-sparse-keymap))) | 166 | :doc "Local keymap used for VC-Annotate mode." |
| 167 | (define-key m "a" #'vc-annotate-revision-previous-to-line) | 167 | "a" #'vc-annotate-revision-previous-to-line |
| 168 | (define-key m "d" #'vc-annotate-show-diff-revision-at-line) | 168 | "d" #'vc-annotate-show-diff-revision-at-line |
| 169 | (define-key m "=" #'vc-annotate-show-diff-revision-at-line) | 169 | "=" #'vc-annotate-show-diff-revision-at-line |
| 170 | (define-key m "D" #'vc-annotate-show-changeset-diff-revision-at-line) | 170 | "D" #'vc-annotate-show-changeset-diff-revision-at-line |
| 171 | (define-key m "f" #'vc-annotate-find-revision-at-line) | 171 | "f" #'vc-annotate-find-revision-at-line |
| 172 | (define-key m "j" #'vc-annotate-revision-at-line) | 172 | "j" #'vc-annotate-revision-at-line |
| 173 | (define-key m "l" #'vc-annotate-show-log-revision-at-line) | 173 | "l" #'vc-annotate-show-log-revision-at-line |
| 174 | (define-key m "n" #'vc-annotate-next-revision) | 174 | "n" #'vc-annotate-next-revision |
| 175 | (define-key m "p" #'vc-annotate-prev-revision) | 175 | "p" #'vc-annotate-prev-revision |
| 176 | (define-key m "w" #'vc-annotate-working-revision) | 176 | "w" #'vc-annotate-working-revision |
| 177 | (define-key m "v" #'vc-annotate-toggle-annotation-visibility) | 177 | "v" #'vc-annotate-toggle-annotation-visibility |
| 178 | (define-key m "\C-m" #'vc-annotate-goto-line) | 178 | "RET" #'vc-annotate-goto-line) |
| 179 | m) | ||
| 180 | "Local keymap used for VC-Annotate mode.") | ||
| 181 | 179 | ||
| 182 | ;;; Annotate functionality | 180 | ;;; Annotate functionality |
| 183 | 181 | ||
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 072bd72b441..f6b17d4ce09 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -1008,19 +1008,17 @@ stream. Standard error output is discarded." | |||
| 1008 | ;; frob the results accordingly. | 1008 | ;; frob the results accordingly. |
| 1009 | (file-relative-name dir (vc-bzr-root dir))))) | 1009 | (file-relative-name dir (vc-bzr-root dir))))) |
| 1010 | 1010 | ||
| 1011 | (defvar vc-bzr-shelve-map | 1011 | (defvar-keymap vc-bzr-shelve-map |
| 1012 | (let ((map (make-sparse-keymap))) | 1012 | ;; Turn off vc-dir marking |
| 1013 | ;; Turn off vc-dir marking | 1013 | "<mouse-2>" #'ignore |
| 1014 | (define-key map [mouse-2] #'ignore) | 1014 | |
| 1015 | 1015 | "<down-mouse-3>" #'vc-bzr-shelve-menu | |
| 1016 | (define-key map [down-mouse-3] #'vc-bzr-shelve-menu) | 1016 | "C-k" #'vc-bzr-shelve-delete-at-point |
| 1017 | (define-key map "\C-k" #'vc-bzr-shelve-delete-at-point) | 1017 | "=" #'vc-bzr-shelve-show-at-point |
| 1018 | (define-key map "=" #'vc-bzr-shelve-show-at-point) | 1018 | "RET" #'vc-bzr-shelve-show-at-point |
| 1019 | (define-key map "\C-m" #'vc-bzr-shelve-show-at-point) | 1019 | "A" #'vc-bzr-shelve-apply-and-keep-at-point |
| 1020 | (define-key map "A" #'vc-bzr-shelve-apply-and-keep-at-point) | 1020 | "P" #'vc-bzr-shelve-apply-at-point |
| 1021 | (define-key map "P" #'vc-bzr-shelve-apply-at-point) | 1021 | "S" #'vc-bzr-shelve-snapshot) |
| 1022 | (define-key map "S" #'vc-bzr-shelve-snapshot) | ||
| 1023 | map)) | ||
| 1024 | 1022 | ||
| 1025 | (defvar vc-bzr-shelve-menu-map | 1023 | (defvar vc-bzr-shelve-menu-map |
| 1026 | (let ((map (make-sparse-keymap "Bzr Shelve"))) | 1024 | (let ((map (make-sparse-keymap "Bzr Shelve"))) |
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 9335da10065..068a66b25b8 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el | |||
| @@ -1467,17 +1467,13 @@ These are the commands available for use in the file status buffer: | |||
| 1467 | (propertize "Please add backend specific headers here. It's easy!" | 1467 | (propertize "Please add backend specific headers here. It's easy!" |
| 1468 | 'face 'vc-dir-status-warning))) | 1468 | 'face 'vc-dir-status-warning))) |
| 1469 | 1469 | ||
| 1470 | (defvar vc-dir-status-mouse-map | 1470 | (defvar-keymap vc-dir-status-mouse-map |
| 1471 | (let ((map (make-sparse-keymap))) | 1471 | :doc "Local keymap for toggling mark." |
| 1472 | (define-key map [mouse-2] #'vc-dir-toggle-mark) | 1472 | "<mouse-2>" #'vc-dir-toggle-mark) |
| 1473 | map) | ||
| 1474 | "Local keymap for toggling mark.") | ||
| 1475 | 1473 | ||
| 1476 | (defvar vc-dir-filename-mouse-map | 1474 | (defvar-keymap vc-dir-filename-mouse-map |
| 1477 | (let ((map (make-sparse-keymap))) | 1475 | :doc "Local keymap for visiting a file." |
| 1478 | (define-key map [mouse-2] #'vc-dir-find-file-other-window) | 1476 | "<mouse-2>" #'vc-dir-find-file-other-window) |
| 1479 | map) | ||
| 1480 | "Local keymap for visiting a file.") | ||
| 1481 | 1477 | ||
| 1482 | (defun vc-default-dir-printer (_backend fileentry) | 1478 | (defun vc-default-dir-printer (_backend fileentry) |
| 1483 | "Pretty print FILEENTRY." | 1479 | "Pretty print FILEENTRY." |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 8937454d111..46a486a46c3 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -664,32 +664,26 @@ or an empty string if none." | |||
| 664 | :files files | 664 | :files files |
| 665 | :update-function update-function))) | 665 | :update-function update-function))) |
| 666 | 666 | ||
| 667 | (defvar vc-git-stash-shared-map | 667 | (defvar-keymap vc-git-stash-shared-map |
| 668 | (let ((map (make-sparse-keymap))) | 668 | "S" #'vc-git-stash-snapshot |
| 669 | (define-key map "S" #'vc-git-stash-snapshot) | 669 | "C" #'vc-git-stash) |
| 670 | (define-key map "C" #'vc-git-stash) | 670 | |
| 671 | map)) | 671 | (defvar-keymap vc-git-stash-map |
| 672 | 672 | :parent vc-git-stash-shared-map | |
| 673 | (defvar vc-git-stash-map | 673 | ;; Turn off vc-dir marking |
| 674 | (let ((map (make-sparse-keymap))) | 674 | "<mouse-2>" #'ignore |
| 675 | (set-keymap-parent map vc-git-stash-shared-map) | 675 | |
| 676 | ;; Turn off vc-dir marking | 676 | "<down-mouse-3>" #'vc-git-stash-menu |
| 677 | (define-key map [mouse-2] #'ignore) | 677 | "C-k" #'vc-git-stash-delete-at-point |
| 678 | 678 | "=" #'vc-git-stash-show-at-point | |
| 679 | (define-key map [down-mouse-3] #'vc-git-stash-menu) | 679 | "RET" #'vc-git-stash-show-at-point |
| 680 | (define-key map "\C-k" #'vc-git-stash-delete-at-point) | 680 | "A" #'vc-git-stash-apply-at-point |
| 681 | (define-key map "=" #'vc-git-stash-show-at-point) | 681 | "P" #'vc-git-stash-pop-at-point) |
| 682 | (define-key map "\C-m" #'vc-git-stash-show-at-point) | 682 | |
| 683 | (define-key map "A" #'vc-git-stash-apply-at-point) | 683 | (defvar-keymap vc-git-stash-button-map |
| 684 | (define-key map "P" #'vc-git-stash-pop-at-point) | 684 | :parent vc-git-stash-shared-map |
| 685 | map)) | 685 | "<mouse-2>" #'push-button |
| 686 | 686 | "RET" #'push-button) | |
| 687 | (defvar vc-git-stash-button-map | ||
| 688 | (let ((map (make-sparse-keymap))) | ||
| 689 | (set-keymap-parent map vc-git-stash-shared-map) | ||
| 690 | (define-key map [mouse-2] #'push-button) | ||
| 691 | (define-key map "\C-m" #'push-button) | ||
| 692 | map)) | ||
| 693 | 687 | ||
| 694 | (defconst vc-git-stash-shared-help | 688 | (defconst vc-git-stash-shared-help |
| 695 | "\\<vc-git-stash-shared-map>\\[vc-git-stash]: Create named stash\n\\[vc-git-stash-snapshot]: Snapshot stash") | 689 | "\\<vc-git-stash-shared-map>\\[vc-git-stash]: Create named stash\n\\[vc-git-stash-snapshot]: Snapshot stash") |
| @@ -910,12 +904,11 @@ If toggling on, also insert its message into the buffer." | |||
| 910 | standard-output 1 nil | 904 | standard-output 1 nil |
| 911 | "log" "--max-count=1" "--pretty=format:%B" "HEAD"))))) | 905 | "log" "--max-count=1" "--pretty=format:%B" "HEAD"))))) |
| 912 | 906 | ||
| 913 | (defvar vc-git-log-edit-mode-map | 907 | (defvar-keymap vc-git-log-edit-mode-map |
| 914 | (let ((map (make-sparse-keymap "Git-Log-Edit"))) | 908 | :name "Git-Log-Edit" |
| 915 | (define-key map "\C-c\C-s" #'vc-git-log-edit-toggle-signoff) | 909 | "C-c C-s" #'vc-git-log-edit-toggle-signoff |
| 916 | (define-key map "\C-c\C-n" #'vc-git-log-edit-toggle-no-verify) | 910 | "C-c C-n" #'vc-git-log-edit-toggle-no-verify |
| 917 | (define-key map "\C-c\C-e" #'vc-git-log-edit-toggle-amend) | 911 | "C-c C-e" #'vc-git-log-edit-toggle-amend) |
| 918 | map)) | ||
| 919 | 912 | ||
| 920 | (define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git" | 913 | (define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git" |
| 921 | "Major mode for editing Git log messages. | 914 | "Major mode for editing Git log messages. |
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 5fba2b3908a..61976288e35 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -1177,10 +1177,9 @@ If toggling on, also insert its message into the buffer." | |||
| 1177 | standard-output 1 nil | 1177 | standard-output 1 nil |
| 1178 | "log" "--limit=1" "--template" "{desc}"))))) | 1178 | "log" "--limit=1" "--template" "{desc}"))))) |
| 1179 | 1179 | ||
| 1180 | (defvar vc-hg-log-edit-mode-map | 1180 | (defvar-keymap vc-hg-log-edit-mode-map |
| 1181 | (let ((map (make-sparse-keymap "Hg-Log-Edit"))) | 1181 | :name "Hg-Log-Edit" |
| 1182 | (define-key map "\C-c\C-e" #'vc-hg-log-edit-toggle-amend) | 1182 | "C-c C-e" #'vc-hg-log-edit-toggle-amend) |
| 1183 | map)) | ||
| 1184 | 1183 | ||
| 1185 | (define-derived-mode vc-hg-log-edit-mode log-edit-mode "Log-Edit/hg" | 1184 | (define-derived-mode vc-hg-log-edit-mode log-edit-mode "Log-Edit/hg" |
| 1186 | "Major mode for editing Hg log messages. | 1185 | "Major mode for editing Hg log messages. |
| @@ -1262,9 +1261,7 @@ REV is the revision to check out into WORKFILE." | |||
| 1262 | 1261 | ||
| 1263 | ;;; Hg specific functionality. | 1262 | ;;; Hg specific functionality. |
| 1264 | 1263 | ||
| 1265 | (defvar vc-hg-extra-menu-map | 1264 | (defvar-keymap vc-hg-extra-menu-map) |
| 1266 | (let ((map (make-sparse-keymap))) | ||
| 1267 | map)) | ||
| 1268 | 1265 | ||
| 1269 | (defun vc-hg-extra-menu () vc-hg-extra-menu-map) | 1266 | (defun vc-hg-extra-menu () vc-hg-extra-menu-map) |
| 1270 | 1267 | ||
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 405c9bc2ca4..1f0eeb7e18a 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el | |||
| @@ -855,38 +855,37 @@ In the latter case, VC mode is deactivated for this buffer." | |||
| 855 | ;; Autoloading works fine, but it prevents shortcuts from appearing | 855 | ;; Autoloading works fine, but it prevents shortcuts from appearing |
| 856 | ;; in the menu because they don't exist yet when the menu is built. | 856 | ;; in the menu because they don't exist yet when the menu is built. |
| 857 | ;; (autoload 'vc-prefix-map "vc" nil nil 'keymap) | 857 | ;; (autoload 'vc-prefix-map "vc" nil nil 'keymap) |
| 858 | (defvar vc-prefix-map | 858 | (defvar-keymap vc-prefix-map |
| 859 | (let ((map (make-sparse-keymap))) | 859 | "a" #'vc-update-change-log |
| 860 | (define-key map "a" #'vc-update-change-log) | 860 | "d" #'vc-dir |
| 861 | (with-suppressed-warnings ((obsolete vc-switch-backend)) | 861 | "g" #'vc-annotate |
| 862 | (define-key map "b" #'vc-switch-backend)) | 862 | "G" #'vc-ignore |
| 863 | (define-key map "d" #'vc-dir) | 863 | "h" #'vc-region-history |
| 864 | (define-key map "g" #'vc-annotate) | 864 | "i" #'vc-register |
| 865 | (define-key map "G" #'vc-ignore) | 865 | "l" #'vc-print-log |
| 866 | (define-key map "h" #'vc-region-history) | 866 | "L" #'vc-print-root-log |
| 867 | (define-key map "i" #'vc-register) | 867 | "I" #'vc-log-incoming |
| 868 | (define-key map "l" #'vc-print-log) | 868 | "O" #'vc-log-outgoing |
| 869 | (define-key map "L" #'vc-print-root-log) | 869 | "M L" #'vc-log-mergebase |
| 870 | (define-key map "I" #'vc-log-incoming) | 870 | "M D" #'vc-diff-mergebase |
| 871 | (define-key map "O" #'vc-log-outgoing) | 871 | "m" #'vc-merge |
| 872 | (define-key map "ML" #'vc-log-mergebase) | 872 | "r" #'vc-retrieve-tag |
| 873 | (define-key map "MD" #'vc-diff-mergebase) | 873 | "s" #'vc-create-tag |
| 874 | (define-key map "m" #'vc-merge) | 874 | "u" #'vc-revert |
| 875 | (define-key map "r" #'vc-retrieve-tag) | 875 | "v" #'vc-next-action |
| 876 | (define-key map "s" #'vc-create-tag) | 876 | "+" #'vc-update |
| 877 | (define-key map "u" #'vc-revert) | 877 | ;; I'd prefer some kind of symmetry with vc-update: |
| 878 | (define-key map "v" #'vc-next-action) | 878 | "P" #'vc-push |
| 879 | (define-key map "+" #'vc-update) | 879 | "=" #'vc-diff |
| 880 | ;; I'd prefer some kind of symmetry with vc-update: | 880 | "D" #'vc-root-diff |
| 881 | (define-key map "P" #'vc-push) | 881 | "~" #'vc-revision-other-window |
| 882 | (define-key map "=" #'vc-diff) | 882 | "x" #'vc-delete-file) |
| 883 | (define-key map "D" #'vc-root-diff) | ||
| 884 | (define-key map "~" #'vc-revision-other-window) | ||
| 885 | (define-key map "x" #'vc-delete-file) | ||
| 886 | map)) | ||
| 887 | (fset 'vc-prefix-map vc-prefix-map) | 883 | (fset 'vc-prefix-map vc-prefix-map) |
| 888 | (define-key ctl-x-map "v" 'vc-prefix-map) | 884 | (define-key ctl-x-map "v" 'vc-prefix-map) |
| 889 | 885 | ||
| 886 | (with-suppressed-warnings ((obsolete vc-switch-backend)) | ||
| 887 | (keymap-set vc-prefix-map "b" #'vc-switch-backend)) | ||
| 888 | |||
| 890 | (defvar vc-menu-map | 889 | (defvar vc-menu-map |
| 891 | (let ((map (make-sparse-keymap "Version Control"))) | 890 | (let ((map (make-sparse-keymap "Version Control"))) |
| 892 | ;;(define-key map [show-files] | 891 | ;;(define-key map [show-files] |