diff options
Diffstat (limited to 'lisp')
135 files changed, 865 insertions, 769 deletions
diff --git a/lisp/align.el b/lisp/align.el index 4c82d7bea81..0af5e56c668 100644 --- a/lisp/align.el +++ b/lisp/align.el | |||
| @@ -74,7 +74,7 @@ | |||
| 74 | ;; align-?-modes variables (for example, `align-dq-string-modes'), use | 74 | ;; align-?-modes variables (for example, `align-dq-string-modes'), use |
| 75 | ;; `add-to-list', or some similar function which checks first to see | 75 | ;; `add-to-list', or some similar function which checks first to see |
| 76 | ;; if the value is already there. Since the user may customize that | 76 | ;; if the value is already there. Since the user may customize that |
| 77 | ;; mode list, and then write your mode name into their .emacs file, | 77 | ;; mode list, and then write your mode name into their init file, |
| 78 | ;; causing the symbol already to be present the next time they load | 78 | ;; causing the symbol already to be present the next time they load |
| 79 | ;; your package. | 79 | ;; your package. |
| 80 | 80 | ||
| @@ -1201,7 +1201,10 @@ have been aligned. No changes will be made to the buffer." | |||
| 1201 | (gocol col) cur) | 1201 | (gocol col) cur) |
| 1202 | (when area | 1202 | (when area |
| 1203 | (if func | 1203 | (if func |
| 1204 | (funcall func (car area) (cdr area) change) | 1204 | (funcall func |
| 1205 | (marker-position (car area)) | ||
| 1206 | (marker-position (cdr area)) | ||
| 1207 | change) | ||
| 1205 | (if (not (and justify | 1208 | (if (not (and justify |
| 1206 | (consp (cdr area)))) | 1209 | (consp (cdr area)))) |
| 1207 | (goto-char (cdr area)) | 1210 | (goto-char (cdr area)) |
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index fbf8c466585..21c35811ac3 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | ;; setq auto-insert-directory to an appropriate slash-terminated value | 36 | ;; setq auto-insert-directory to an appropriate slash-terminated value |
| 37 | ;; | 37 | ;; |
| 38 | ;; You can also customize the variable `auto-insert-mode' to load the | 38 | ;; You can also customize the variable `auto-insert-mode' to load the |
| 39 | ;; package. Alternatively, add the following to your .emacs file: | 39 | ;; package. Alternatively, add the following to your init file: |
| 40 | ;; (auto-insert-mode 1) | 40 | ;; (auto-insert-mode 1) |
| 41 | ;; | 41 | ;; |
| 42 | ;; Author: Charlie Martin | 42 | ;; Author: Charlie Martin |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 75a8d9f59dc..31bbc13acf9 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -144,10 +144,7 @@ You can toggle whether files are shown with \\<bookmark-bmenu-mode-map>\\[bookma | |||
| 144 | 144 | ||
| 145 | (defcustom bookmark-bmenu-toggle-filenames t | 145 | (defcustom bookmark-bmenu-toggle-filenames t |
| 146 | "Non-nil means show filenames when listing bookmarks. | 146 | "Non-nil means show filenames when listing bookmarks. |
| 147 | This may result in truncated bookmark names. To disable this, put the | 147 | A non-nil value may result in truncated bookmark names." |
| 148 | following in your `.emacs' file: | ||
| 149 | |||
| 150 | \(setq bookmark-bmenu-toggle-filenames nil)" | ||
| 151 | :type 'boolean | 148 | :type 'boolean |
| 152 | :group 'bookmark) | 149 | :group 'bookmark) |
| 153 | 150 | ||
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 7089070df59..c7d93530fd7 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | (declare-function math-vector-is-string "calccomp" (a)) | 61 | (declare-function math-vector-is-string "calccomp" (a)) |
| 62 | (declare-function math-vector-to-string "calccomp" (a &optional quoted)) | 62 | (declare-function math-vector-to-string "calccomp" (a &optional quoted)) |
| 63 | (declare-function math-format-radix-float "calc-bin" (a prec)) | 63 | (declare-function math-format-radix-float "calc-bin" (a prec)) |
| 64 | (declare-function math-compose-expr "calccomp" (a prec)) | 64 | (declare-function math-compose-expr "calccomp" (a prec &optional div)) |
| 65 | (declare-function math-abs "calc-arith" (a)) | 65 | (declare-function math-abs "calc-arith" (a)) |
| 66 | (declare-function math-format-bignum-binary "calc-bin" (a)) | 66 | (declare-function math-format-bignum-binary "calc-bin" (a)) |
| 67 | (declare-function math-format-bignum-octal "calc-bin" (a)) | 67 | (declare-function math-format-bignum-octal "calc-bin" (a)) |
| @@ -3483,7 +3483,7 @@ If X is not an error form, return 1." | |||
| 3483 | (substring str i)))) | 3483 | (substring str i)))) |
| 3484 | str)) | 3484 | str)) |
| 3485 | 3485 | ||
| 3486 | ;;; Users can redefine this in their .emacs files. | 3486 | ;;; Users can redefine this in their init files. |
| 3487 | (defvar calc-keypad-user-menu nil | 3487 | (defvar calc-keypad-user-menu nil |
| 3488 | "If non-nil, this describes an additional menu for calc-keypad. | 3488 | "If non-nil, this describes an additional menu for calc-keypad. |
| 3489 | It should contain a list of three rows. | 3489 | It should contain a list of three rows. |
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index dfc5dfc6588..bd748158d66 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el | |||
| @@ -494,7 +494,7 @@ | |||
| 494 | (car res)))))))) | 494 | (car res)))))))) |
| 495 | 495 | ||
| 496 | 496 | ||
| 497 | ;;; It is safe to redefine these in your .emacs file to use a different | 497 | ;;; It is safe to redefine these in your init file to use a different |
| 498 | ;;; language. | 498 | ;;; language. |
| 499 | 499 | ||
| 500 | (defvar math-long-weekday-names '( "Sunday" "Monday" "Tuesday" "Wednesday" | 500 | (defvar math-long-weekday-names '( "Sunday" "Monday" "Tuesday" "Wednesday" |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 3e6ae1c7404..17f0998d30b 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -199,7 +199,7 @@ | |||
| 199 | (declare-function calc-div-fractions "calc-frac" (a b)) | 199 | (declare-function calc-div-fractions "calc-frac" (a b)) |
| 200 | (declare-function math-div-objects-fancy "calc-arith" (a b)) | 200 | (declare-function math-div-objects-fancy "calc-arith" (a b)) |
| 201 | (declare-function math-div-symb-fancy "calc-arith" (a b)) | 201 | (declare-function math-div-symb-fancy "calc-arith" (a b)) |
| 202 | (declare-function math-compose-expr "calccomp" (a prec)) | 202 | (declare-function math-compose-expr "calccomp" (a prec &optional div)) |
| 203 | (declare-function math-comp-width "calccomp" (c)) | 203 | (declare-function math-comp-width "calccomp" (c)) |
| 204 | (declare-function math-composition-to-string "calccomp" (c &optional width)) | 204 | (declare-function math-composition-to-string "calccomp" (c &optional width)) |
| 205 | (declare-function math-stack-value-offset-fancy "calccomp" ()) | 205 | (declare-function math-stack-value-offset-fancy "calccomp" ()) |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index d5514d14a32..cdbf8d7aa86 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -593,7 +593,7 @@ You can customize `diary-date-forms' to your preferred format. | |||
| 593 | Three default styles are provided: `diary-american-date-forms', | 593 | Three default styles are provided: `diary-american-date-forms', |
| 594 | `diary-european-date-forms', and `diary-iso-date-forms'. | 594 | `diary-european-date-forms', and `diary-iso-date-forms'. |
| 595 | You can choose between these by setting `calendar-date-style' in your | 595 | You can choose between these by setting `calendar-date-style' in your |
| 596 | .emacs file, or by using `calendar-set-date-style' when in the calendar. | 596 | init file, or by using `calendar-set-date-style' when in the calendar. |
| 597 | 597 | ||
| 598 | A diary entry can be preceded by the character `diary-nonmarking-symbol' | 598 | A diary entry can be preceded by the character `diary-nonmarking-symbol' |
| 599 | \(ordinarily `&') to make that entry nonmarking--that is, it will not be | 599 | \(ordinarily `&') to make that entry nonmarking--that is, it will not be |
| @@ -1276,7 +1276,7 @@ Runs the following hooks: | |||
| 1276 | generating a calendar, if today's date is visible or not, respectively | 1276 | generating a calendar, if today's date is visible or not, respectively |
| 1277 | `calendar-initial-window-hook' - after first creating a calendar | 1277 | `calendar-initial-window-hook' - after first creating a calendar |
| 1278 | 1278 | ||
| 1279 | This function is suitable for execution in a .emacs file." | 1279 | This function is suitable for execution in an init file." |
| 1280 | (interactive "P") | 1280 | (interactive "P") |
| 1281 | ;; Avoid loading cal-x unless it will be used. | 1281 | ;; Avoid loading cal-x unless it will be used. |
| 1282 | (if (and (memq calendar-setup '(one-frame two-frames calendar-only)) | 1282 | (if (and (memq calendar-setup '(one-frame two-frames calendar-only)) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 8fa5b0ddb07..4bce8ec0927 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -200,19 +200,21 @@ holidays), or hard copy output." | |||
| 200 | 'diary-list-entries-hook "23.1") | 200 | 'diary-list-entries-hook "23.1") |
| 201 | 201 | ||
| 202 | (defcustom diary-list-entries-hook nil | 202 | (defcustom diary-list-entries-hook nil |
| 203 | "List of functions called after diary file is culled for relevant entries. | 203 | "Hook run after diary file is culled for relevant entries. |
| 204 | You might wish to add `diary-include-other-diary-files', in which case | 204 | |
| 205 | you will probably also want to add `diary-mark-included-diary-files' to | 205 | If you add `diary-include-other-diary-files' to this hook, you |
| 206 | `diary-mark-entries-hook'. For example, you could use | 206 | will probably also want to add `diary-mark-included-diary-files' |
| 207 | to `diary-mark-entries-hook'. For example, to cause the fancy | ||
| 208 | diary buffer to be displayed with diary entries from various | ||
| 209 | included files, each day's entries sorted into lexicographic | ||
| 210 | order, add the following to your init file: | ||
| 207 | 211 | ||
| 208 | (setq diary-display-function 'diary-fancy-display) | 212 | (setq diary-display-function 'diary-fancy-display) |
| 209 | (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) | 213 | (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) |
| 210 | (add-hook 'diary-list-entries-hook 'diary-sort-entries t) | 214 | (add-hook 'diary-list-entries-hook 'diary-sort-entries t) |
| 211 | 215 | ||
| 212 | in your `.emacs' file to cause the fancy diary buffer to be displayed with | 216 | Note how the sort function is placed last, so that it can sort |
| 213 | diary entries from various included files, each day's entries sorted into | 217 | the entries included from other files. |
| 214 | lexicographic order. Note how the sort function is placed last, | ||
| 215 | so that it can sort the entries included from other files. | ||
| 216 | 218 | ||
| 217 | This hook runs after `diary-nongregorian-listing-hook'. These two hooks | 219 | This hook runs after `diary-nongregorian-listing-hook'. These two hooks |
| 218 | differ only if you are using included diary files. In that case, | 220 | differ only if you are using included diary files. In that case, |
| @@ -532,7 +534,7 @@ If so, return the expanded file name, otherwise signal an error." | |||
| 532 | "Generate the diary window for ARG days starting with the current date. | 534 | "Generate the diary window for ARG days starting with the current date. |
| 533 | If no argument is provided, the number of days of diary entries is governed | 535 | If no argument is provided, the number of days of diary entries is governed |
| 534 | by the variable `diary-number-of-entries'. A value of ARG less than 1 | 536 | by the variable `diary-number-of-entries'. A value of ARG less than 1 |
| 535 | does nothing. This function is suitable for execution in a `.emacs' file." | 537 | does nothing. This function is suitable for execution in an init file." |
| 536 | (interactive "P") | 538 | (interactive "P") |
| 537 | (diary-check-diary-file) | 539 | (diary-check-diary-file) |
| 538 | (diary-list-entries (calendar-current-date) | 540 | (diary-list-entries (calendar-current-date) |
| @@ -1230,8 +1232,8 @@ Mail is sent to the address specified by `diary-mail-addr'. | |||
| 1230 | 1232 | ||
| 1231 | Here is an example of a script to call `diary-mail-entries', | 1233 | Here is an example of a script to call `diary-mail-entries', |
| 1232 | suitable for regular scheduling using cron (or at). Note that | 1234 | suitable for regular scheduling using cron (or at). Note that |
| 1233 | since `emacs -script' does not load your `.emacs' file, you | 1235 | since `emacs -script' does not load your init file, you should |
| 1234 | should ensure that all relevant variables are set. | 1236 | ensure that all relevant variables are set. |
| 1235 | 1237 | ||
| 1236 | #!/usr/bin/emacs -script | 1238 | #!/usr/bin/emacs -script |
| 1237 | ;; diary-rem.el - run the Emacs diary-reminder | 1239 | ;; diary-rem.el - run the Emacs diary-reminder |
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 9643a1e2905..b94815f98ea 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el | |||
| @@ -343,12 +343,12 @@ See the documentation for `calendar-holidays' for details." | |||
| 343 | "List of notable days for the command \\[holidays]. | 343 | "List of notable days for the command \\[holidays]. |
| 344 | 344 | ||
| 345 | Additional holidays are easy to add to the list, just put them in the | 345 | Additional holidays are easy to add to the list, just put them in the |
| 346 | list `holiday-other-holidays' in your .emacs file. Similarly, by setting | 346 | list `holiday-other-holidays' in your init file. Similarly, by setting |
| 347 | any of `holiday-general-holidays', `holiday-local-holidays', | 347 | any of `holiday-general-holidays', `holiday-local-holidays', |
| 348 | `holiday-christian-holidays', `holiday-hebrew-holidays', | 348 | `holiday-christian-holidays', `holiday-hebrew-holidays', |
| 349 | `holiday-islamic-holidays', `holiday-bahai-holidays', | 349 | `holiday-islamic-holidays', `holiday-bahai-holidays', |
| 350 | `holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your | 350 | `holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your |
| 351 | .emacs file, you can eliminate unwanted categories of holidays. | 351 | init file, you can eliminate unwanted categories of holidays. |
| 352 | 352 | ||
| 353 | The aforementioned variables control the holiday choices offered | 353 | The aforementioned variables control the holiday choices offered |
| 354 | by the function `holiday-list' when it is called interactively. | 354 | by the function `holiday-list' when it is called interactively. |
| @@ -523,7 +523,7 @@ use instead of point." | |||
| 523 | (defun holidays (&optional arg) | 523 | (defun holidays (&optional arg) |
| 524 | "Display the holidays for last month, this month, and next month. | 524 | "Display the holidays for last month, this month, and next month. |
| 525 | If called with an optional prefix argument ARG, prompts for month and year. | 525 | If called with an optional prefix argument ARG, prompts for month and year. |
| 526 | This function is suitable for execution in a .emacs file." | 526 | This function is suitable for execution in a init file." |
| 527 | (interactive "P") | 527 | (interactive "P") |
| 528 | (save-excursion | 528 | (save-excursion |
| 529 | (let* ((completion-ignore-case t) | 529 | (let* ((completion-ignore-case t) |
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 8f09d20f50e..2761df0bdb1 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el | |||
| @@ -236,7 +236,7 @@ use instead of point." | |||
| 236 | (defun lunar-phases (&optional arg) | 236 | (defun lunar-phases (&optional arg) |
| 237 | "Display the quarters of the moon for last month, this month, and next month. | 237 | "Display the quarters of the moon for last month, this month, and next month. |
| 238 | If called with an optional prefix argument ARG, prompts for month and year. | 238 | If called with an optional prefix argument ARG, prompts for month and year. |
| 239 | This function is suitable for execution in a .emacs file." | 239 | This function is suitable for execution in an init file." |
| 240 | (interactive "P") | 240 | (interactive "P") |
| 241 | (save-excursion | 241 | (save-excursion |
| 242 | (let* ((date (if arg (calendar-read-date t) | 242 | (let* ((date (if arg (calendar-read-date t) |
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index a8d7d44af3b..3ccdf135fb6 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el | |||
| @@ -797,7 +797,7 @@ If called with an optional prefix argument ARG, prompt for date. | |||
| 797 | If called with an optional double prefix argument, prompt for | 797 | If called with an optional double prefix argument, prompt for |
| 798 | longitude, latitude, time zone, and date, and always use standard time. | 798 | longitude, latitude, time zone, and date, and always use standard time. |
| 799 | 799 | ||
| 800 | This function is suitable for execution in a .emacs file." | 800 | This function is suitable for execution in an init file." |
| 801 | (interactive "p") | 801 | (interactive "p") |
| 802 | (or arg (setq arg 1)) | 802 | (or arg (setq arg 1)) |
| 803 | (if (and (< arg 16) | 803 | (if (and (< arg 16) |
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index 2ebb8c7c3ae..3151ce145de 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | ;; If you want Emacs to display the amount of time "left" to your | 49 | ;; If you want Emacs to display the amount of time "left" to your |
| 50 | ;; workday in the mode-line, you can either set the value of | 50 | ;; workday in the mode-line, you can either set the value of |
| 51 | ;; `timeclock-mode-line-display' to t using M-x customize, or you can | 51 | ;; `timeclock-mode-line-display' to t using M-x customize, or you can |
| 52 | ;; add this code to your .emacs file: | 52 | ;; add this code to your init file: |
| 53 | ;; | 53 | ;; |
| 54 | ;; (require 'timeclock) | 54 | ;; (require 'timeclock) |
| 55 | ;; (timeclock-mode-line-display) | 55 | ;; (timeclock-mode-line-display) |
| @@ -60,7 +60,7 @@ | |||
| 60 | ;; You may also want Emacs to ask you before exiting, if you are | 60 | ;; You may also want Emacs to ask you before exiting, if you are |
| 61 | ;; currently working on a project. This can be done either by setting | 61 | ;; currently working on a project. This can be done either by setting |
| 62 | ;; `timeclock-ask-before-exiting' to t using M-x customize (this is | 62 | ;; `timeclock-ask-before-exiting' to t using M-x customize (this is |
| 63 | ;; the default), or by adding the following to your .emacs file: | 63 | ;; the default), or by adding the following to your init file: |
| 64 | ;; | 64 | ;; |
| 65 | ;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out) | 65 | ;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out) |
| 66 | 66 | ||
diff --git a/lisp/comint.el b/lisp/comint.el index 5b0eb3027e6..994d81a375a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -181,7 +181,7 @@ override the read-only-ness of comint prompts is to call | |||
| 181 | `comint-kill-whole-line' or `comint-kill-region' with no | 181 | `comint-kill-whole-line' or `comint-kill-region' with no |
| 182 | narrowing in effect. This way you will be certain that none of | 182 | narrowing in effect. This way you will be certain that none of |
| 183 | the remaining prompts will be accidentally messed up. You may | 183 | the remaining prompts will be accidentally messed up. You may |
| 184 | wish to put something like the following in your `.emacs' file: | 184 | wish to put something like the following in your init file: |
| 185 | 185 | ||
| 186 | \(add-hook 'comint-mode-hook | 186 | \(add-hook 'comint-mode-hook |
| 187 | (lambda () | 187 | (lambda () |
| @@ -3161,8 +3161,8 @@ See `completion-table-with-quoting' and `comint-unquote-function'.") | |||
| 3161 | (complete-with-action action table string pred)))) | 3161 | (complete-with-action action table string pred)))) |
| 3162 | (unless (zerop (length filesuffix)) | 3162 | (unless (zerop (length filesuffix)) |
| 3163 | (list :exit-function | 3163 | (list :exit-function |
| 3164 | (lambda (_s finished) | 3164 | (lambda (_s status) |
| 3165 | (when (memq finished '(sole finished)) | 3165 | (when (eq status 'finished) |
| 3166 | (if (looking-at (regexp-quote filesuffix)) | 3166 | (if (looking-at (regexp-quote filesuffix)) |
| 3167 | (goto-char (match-end 0)) | 3167 | (goto-char (match-end 0)) |
| 3168 | (insert filesuffix))))))))) | 3168 | (insert filesuffix))))))))) |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 86a19131569..2e6f2b14625 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -526,7 +526,10 @@ WIDGET is the widget to apply the filter entries of MENU on." | |||
| 526 | :type 'boolean) | 526 | :type 'boolean) |
| 527 | 527 | ||
| 528 | (defcustom custom-unlispify-remove-prefixes nil | 528 | (defcustom custom-unlispify-remove-prefixes nil |
| 529 | "Non-nil means remove group prefixes from option names in buffer." | 529 | "Non-nil means remove group prefixes from option names in buffer. |
| 530 | Discarding prefixes often leads to confusing names for options | ||
| 531 | and faces in Customize buffers, so do not set this to a non-nil | ||
| 532 | value unless you are sure you know what it does." | ||
| 530 | :group 'custom-menu | 533 | :group 'custom-menu |
| 531 | :group 'custom-buffer | 534 | :group 'custom-buffer |
| 532 | :type 'boolean) | 535 | :type 'boolean) |
diff --git a/lisp/custom.el b/lisp/custom.el index 3eb2895888d..dfc8e631152 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -237,7 +237,7 @@ The following keywords are meaningful: | |||
| 237 | is `default-value'. | 237 | is `default-value'. |
| 238 | :require | 238 | :require |
| 239 | VALUE should be a feature symbol. If you save a value | 239 | VALUE should be a feature symbol. If you save a value |
| 240 | for this option, then when your `.emacs' file loads the value, | 240 | for this option, then when your init file loads the value, |
| 241 | it does (require VALUE) first. | 241 | it does (require VALUE) first. |
| 242 | :set-after VARIABLES | 242 | :set-after VARIABLES |
| 243 | Specifies that SYMBOL should be set after the list of variables | 243 | Specifies that SYMBOL should be set after the list of variables |
| @@ -350,68 +350,62 @@ FACE does not need to be quoted. | |||
| 350 | 350 | ||
| 351 | Third argument DOC is the face documentation. | 351 | Third argument DOC is the face documentation. |
| 352 | 352 | ||
| 353 | If FACE has been set with `custom-set-faces', set the face attributes | 353 | If FACE has been set with `custom-set-faces', set the face |
| 354 | as specified by that function, otherwise set the face attributes | 354 | attributes as specified by that function, otherwise set the face |
| 355 | according to SPEC. | 355 | attributes according to SPEC. |
| 356 | |||
| 357 | The remaining arguments should have the form | ||
| 358 | |||
| 359 | [KEYWORD VALUE]... | ||
| 360 | 356 | ||
| 357 | The remaining arguments should have the form [KEYWORD VALUE]... | ||
| 361 | For a list of valid keywords, see the common keywords listed in | 358 | For a list of valid keywords, see the common keywords listed in |
| 362 | `defcustom'. | 359 | `defcustom'. |
| 363 | 360 | ||
| 364 | SPEC should be an alist of the form ((DISPLAY ATTS)...). | 361 | SPEC should be an alist of the form |
| 365 | 362 | ||
| 366 | In the first element, DISPLAY can be `default'. The ATTS in that | 363 | ((DISPLAY . ATTS)...) |
| 367 | element then act as defaults for all the following elements. | 364 | |
| 368 | 365 | where DISPLAY is a form specifying conditions to match certain | |
| 369 | Aside from that, DISPLAY specifies conditions to match some or | 366 | terminals and ATTS is a property list (ATTR VALUE ATTR VALUE...) |
| 370 | all frames. For each frame, the first element of SPEC where the | 367 | specifying face attributes and values for frames on those |
| 371 | DISPLAY conditions are satisfied is the one that applies to that | 368 | terminals. On each terminal, the first element with a matching |
| 372 | frame. The ATTRs in this element take effect, and the following | 369 | DISPLAY specification takes effect, and the remaining elements in |
| 373 | elements are ignored, on that frame. | 370 | SPEC are disregarded. |
| 374 | 371 | ||
| 375 | In the last element, DISPLAY can be t. That element applies to a | 372 | As a special exception, in the first element of SPEC, DISPLAY can |
| 376 | frame if none of the previous elements (except the `default' if | 373 | be the special value `default'. Then the ATTS in that element |
| 377 | any) did. | 374 | act as defaults for all the following elements. |
| 378 | 375 | ||
| 379 | ATTS is a list of face attributes followed by their values: | 376 | For backward compatibility, elements of SPEC can be written |
| 380 | (ATTR VALUE ATTR VALUE...) | 377 | as (DISPLAY ATTS) instead of (DISPLAY . ATTS). |
| 381 | 378 | ||
| 382 | The possible attributes are `:family', `:width', `:height', `:weight', | 379 | Each DISPLAY can have the following values: |
| 383 | `:slant', `:underline', `:overline', `:strike-through', `:box', | 380 | - `default' (only in the first element). |
| 384 | `:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'. | 381 | - The symbol t, which matches all terminals. |
| 385 | 382 | - An alist of conditions. Each alist element must have the form | |
| 386 | DISPLAY can be `default' (only in the first element), the symbol | 383 | (REQ ITEM...). A matching terminal must satisfy each |
| 387 | t (only in the last element) to match all frames, or an alist of | 384 | specified condition by matching one of its ITEMs. Each REQ |
| 388 | conditions of the form \(REQ ITEM...). For such an alist to | 385 | must be one of the following: |
| 389 | match a frame, each of the conditions must be satisfied, meaning | 386 | - `type' (the terminal type). |
| 390 | that the REQ property of the frame must match one of the | 387 | Each ITEM must be one of the values returned by |
| 391 | corresponding ITEMs. These are the defined REQ values: | 388 | `window-system'. Under X, additional allowed values are |
| 392 | 389 | `motif', `lucid', `gtk' and `x-toolkit'. | |
| 393 | `type' (the value of `window-system') | 390 | - `class' (the terminal's color support). |
| 394 | Under X, in addition to the values `window-system' can take, | 391 | Each ITEM should be one of `color', `grayscale', or `mono'. |
| 395 | `motif', `lucid', `gtk' and `x-toolkit' are allowed, and match when | 392 | - `background' (what color is used for the background text) |
| 396 | the Motif toolkit, Lucid toolkit, GTK toolkit or any X toolkit is in use. | 393 | Each ITEM should be one of `light' or `dark'. |
| 397 | 394 | - `min-colors' (the minimum number of supported colors) | |
| 398 | `class' (the frame's color support) | 395 | Each ITEM should be an integer, which is compared with the |
| 399 | Should be one of `color', `grayscale', or `mono'. | 396 | result of `display-color-cells'. |
| 400 | 397 | - `supports' (match terminals supporting certain attributes). | |
| 401 | `background' (what color is used for the background text) | 398 | Each ITEM should be a list of face attributes. See |
| 402 | Should be one of `light' or `dark'. | 399 | `display-supports-face-attributes-p' for more information on |
| 403 | 400 | exactly how testing is done. | |
| 404 | `min-colors' (the minimum number of colors the frame should support) | 401 | |
| 405 | Should be an integer, it is compared with the result of | 402 | In the ATTS property list, possible attributes are `:family', |
| 406 | `display-color-cells'. | 403 | `:width', `:height', `:weight', `:slant', `:underline', |
| 407 | 404 | `:overline', `:strike-through', `:box', `:foreground', | |
| 408 | `supports' (only match frames that support the specified face attributes) | 405 | `:background', `:stipple', `:inverse-video', and `:inherit'. |
| 409 | Should be a list of face attributes. See the documentation for | 406 | |
| 410 | the function `display-supports-face-attributes-p' for more | 407 | See Info node `(elisp) Faces' in the Emacs Lisp manual for more |
| 411 | information on exactly how testing is done. | 408 | information." |
| 412 | |||
| 413 | See Info node `(elisp) Customization' in the Emacs Lisp manual | ||
| 414 | for more information." | ||
| 415 | (declare (doc-string 3)) | 409 | (declare (doc-string 3)) |
| 416 | ;; It is better not to use backquote in this file, | 410 | ;; It is better not to use backquote in this file, |
| 417 | ;; because that makes a bootstrapping problem | 411 | ;; because that makes a bootstrapping problem |
| @@ -1227,7 +1221,7 @@ query also about adding HASH to `custom-safe-themes'." | |||
| 1227 | (save-window-excursion | 1221 | (save-window-excursion |
| 1228 | (rename-buffer "*Custom Theme*" t) | 1222 | (rename-buffer "*Custom Theme*" t) |
| 1229 | (emacs-lisp-mode) | 1223 | (emacs-lisp-mode) |
| 1230 | (setq window (pop-to-buffer (current-buffer))) | 1224 | (pop-to-buffer (current-buffer)) |
| 1231 | (goto-char (point-min)) | 1225 | (goto-char (point-min)) |
| 1232 | (prog1 (when (y-or-n-p "Loading a theme can run Lisp code. Really load? ") | 1226 | (prog1 (when (y-or-n-p "Loading a theme can run Lisp code. Really load? ") |
| 1233 | ;; Offer to save to `custom-safe-themes'. | 1227 | ;; Offer to save to `custom-safe-themes'. |
diff --git a/lisp/desktop.el b/lisp/desktop.el index a873a6b63bf..75deb58b4d8 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; - some local variables | 34 | ;; - some local variables |
| 35 | 35 | ||
| 36 | ;; To use this, use customize to turn on desktop-save-mode or add the | 36 | ;; To use this, use customize to turn on desktop-save-mode or add the |
| 37 | ;; following line somewhere in your .emacs file: | 37 | ;; following line somewhere in your init file: |
| 38 | ;; | 38 | ;; |
| 39 | ;; (desktop-save-mode 1) | 39 | ;; (desktop-save-mode 1) |
| 40 | ;; | 40 | ;; |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 1f8e8068de3..e5ca463e8d4 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -244,7 +244,10 @@ List has a form of (file-name full-file-name (attribute-list))." | |||
| 244 | (function dired-check-process) | 244 | (function dired-check-process) |
| 245 | (append | 245 | (append |
| 246 | (list operation program) | 246 | (list operation program) |
| 247 | (unless (string-equal new-attribute "") | 247 | (unless (or (string-equal new-attribute "") |
| 248 | ;; Use `eq' instead of `equal' | ||
| 249 | ;; to detect empty input (bug#12399). | ||
| 250 | (eq new-attribute default)) | ||
| 248 | (if (eq op-symbol 'touch) | 251 | (if (eq op-symbol 'touch) |
| 249 | (list "-t" new-attribute) | 252 | (list "-t" new-attribute) |
| 250 | (list new-attribute))) | 253 | (list new-attribute))) |
| @@ -278,7 +281,10 @@ Symbolic modes like `g+w' are allowed." | |||
| 278 | "Change mode of %s to: " | 281 | "Change mode of %s to: " |
| 279 | nil 'chmod arg files default)) | 282 | nil 'chmod arg files default)) |
| 280 | num-modes) | 283 | num-modes) |
| 281 | (cond ((equal modes "") | 284 | (cond ((or (equal modes "") |
| 285 | ;; Use `eq' instead of `equal' | ||
| 286 | ;; to detect empty input (bug#12399). | ||
| 287 | (eq modes default)) | ||
| 282 | ;; We used to treat empty input as DEFAULT, but that is not | 288 | ;; We used to treat empty input as DEFAULT, but that is not |
| 283 | ;; such a good idea (Bug#9361). | 289 | ;; such a good idea (Bug#9361). |
| 284 | (error "No file mode specified")) | 290 | (error "No file mode specified")) |
diff --git a/lisp/dired.el b/lisp/dired.el index f4ae027181a..54921a4ea66 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3744,7 +3744,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3744 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3744 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3745 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3745 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3746 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3746 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3747 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "4b260eda371d319a6c8e8e5ec917e287") | 3747 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "3c768e470d5d053d0049e0286ce38da7") |
| 3748 | ;;; Generated autoloads from dired-aux.el | 3748 | ;;; Generated autoloads from dired-aux.el |
| 3749 | 3749 | ||
| 3750 | (autoload 'dired-diff "dired-aux" "\ | 3750 | (autoload 'dired-diff "dired-aux" "\ |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index cac76d2bce1..d96076d17a6 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; advice.el --- an overloading mechanism for Emacs Lisp functions | 1 | ;;; advice.el --- An overloading mechanism for Emacs Lisp functions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1994, 2000-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-1994, 2000-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -1746,7 +1746,8 @@ | |||
| 1746 | (provide 'advice-preload) | 1746 | (provide 'advice-preload) |
| 1747 | ;; During a normal load this is a noop: | 1747 | ;; During a normal load this is a noop: |
| 1748 | (require 'advice-preload "advice.el") | 1748 | (require 'advice-preload "advice.el") |
| 1749 | 1749 | (require 'macroexp) | |
| 1750 | (eval-when-compile (require 'cl-lib)) | ||
| 1750 | 1751 | ||
| 1751 | ;; @@ Variable definitions: | 1752 | ;; @@ Variable definitions: |
| 1752 | ;; ======================== | 1753 | ;; ======================== |
| @@ -1812,54 +1813,6 @@ generates a copy of TREE." | |||
| 1812 | (funcall fUnCtIoN tReE)) | 1813 | (funcall fUnCtIoN tReE)) |
| 1813 | (t tReE))) | 1814 | (t tReE))) |
| 1814 | 1815 | ||
| 1815 | ;; this is just faster than `ad-substitute-tree': | ||
| 1816 | (defun ad-copy-tree (tree) | ||
| 1817 | "Return a copy of the list structure of TREE." | ||
| 1818 | (cond ((consp tree) | ||
| 1819 | (cons (ad-copy-tree (car tree)) | ||
| 1820 | (ad-copy-tree (cdr tree)))) | ||
| 1821 | (t tree))) | ||
| 1822 | |||
| 1823 | (defmacro ad-dolist (varform &rest body) | ||
| 1824 | "A Common-Lisp-style dolist iterator with the following syntax: | ||
| 1825 | |||
| 1826 | (ad-dolist (VAR INIT-FORM [RESULT-FORM]) | ||
| 1827 | BODY-FORM...) | ||
| 1828 | |||
| 1829 | which will iterate over the list yielded by INIT-FORM binding VAR to the | ||
| 1830 | current head at every iteration. If RESULT-FORM is supplied its value will | ||
| 1831 | be returned at the end of the iteration, nil otherwise. The iteration can be | ||
| 1832 | exited prematurely with `(ad-do-return [VALUE])'." | ||
| 1833 | (let ((expansion | ||
| 1834 | `(let ((ad-dO-vAr ,(car (cdr varform))) | ||
| 1835 | ,(car varform)) | ||
| 1836 | (while ad-dO-vAr | ||
| 1837 | (setq ,(car varform) (car ad-dO-vAr)) | ||
| 1838 | ,@body | ||
| 1839 | ;;work around a backquote bug: | ||
| 1840 | ;;(` ((,@ '(foo)) (bar))) => (append '(foo) '(((bar)))) wrong | ||
| 1841 | ;;(` ((,@ '(foo)) (, '(bar)))) => (append '(foo) (list '(bar))) | ||
| 1842 | ,'(setq ad-dO-vAr (cdr ad-dO-vAr))) | ||
| 1843 | ,(car (cdr (cdr varform)))))) | ||
| 1844 | ;;ok, this wastes some cons cells but only during compilation: | ||
| 1845 | (if (catch 'contains-return | ||
| 1846 | (ad-substitute-tree | ||
| 1847 | (function (lambda (subtree) | ||
| 1848 | (cond ((eq (car-safe subtree) 'ad-dolist)) | ||
| 1849 | ((eq (car-safe subtree) 'ad-do-return) | ||
| 1850 | (throw 'contains-return t))))) | ||
| 1851 | 'identity body) | ||
| 1852 | nil) | ||
| 1853 | `(catch 'ad-dO-eXiT ,expansion) | ||
| 1854 | expansion))) | ||
| 1855 | |||
| 1856 | (defmacro ad-do-return (value) | ||
| 1857 | `(throw 'ad-dO-eXiT ,value)) | ||
| 1858 | |||
| 1859 | (if (not (get 'ad-dolist 'lisp-indent-hook)) | ||
| 1860 | (put 'ad-dolist 'lisp-indent-hook 1)) | ||
| 1861 | |||
| 1862 | |||
| 1863 | ;; @@ Save real definitions of subrs used by Advice: | 1816 | ;; @@ Save real definitions of subrs used by Advice: |
| 1864 | ;; ================================================= | 1817 | ;; ================================================= |
| 1865 | ;; Advice depends on the real, unmodified functionality of various subrs, | 1818 | ;; Advice depends on the real, unmodified functionality of various subrs, |
| @@ -1924,16 +1877,16 @@ exited prematurely with `(ad-do-return [VALUE])'." | |||
| 1924 | ad-advised-functions))) | 1877 | ad-advised-functions))) |
| 1925 | 1878 | ||
| 1926 | (defmacro ad-do-advised-functions (varform &rest body) | 1879 | (defmacro ad-do-advised-functions (varform &rest body) |
| 1927 | "`ad-dolist'-style iterator that maps over `ad-advised-functions'. | 1880 | "`dolist'-style iterator that maps over `ad-advised-functions'. |
| 1928 | \(ad-do-advised-functions (VAR [RESULT-FORM]) | 1881 | \(ad-do-advised-functions (VAR [RESULT-FORM]) |
| 1929 | BODY-FORM...) | 1882 | BODY-FORM...) |
| 1930 | On each iteration VAR will be bound to the name of an advised function | 1883 | On each iteration VAR will be bound to the name of an advised function |
| 1931 | \(a symbol)." | 1884 | \(a symbol)." |
| 1932 | `(ad-dolist (,(car varform) | 1885 | `(cl-dolist (,(car varform) |
| 1933 | ad-advised-functions | 1886 | ad-advised-functions |
| 1934 | ,(car (cdr varform))) | 1887 | ,(car (cdr varform))) |
| 1935 | (setq ,(car varform) (intern (car ,(car varform)))) | 1888 | (setq ,(car varform) (intern (car ,(car varform)))) |
| 1936 | ,@body)) | 1889 | ,@body)) |
| 1937 | 1890 | ||
| 1938 | (if (not (get 'ad-do-advised-functions 'lisp-indent-hook)) | 1891 | (if (not (get 'ad-do-advised-functions 'lisp-indent-hook)) |
| 1939 | (put 'ad-do-advised-functions 'lisp-indent-hook 1)) | 1892 | (put 'ad-do-advised-functions 'lisp-indent-hook 1)) |
| @@ -1948,7 +1901,7 @@ On each iteration VAR will be bound to the name of an advised function | |||
| 1948 | `(put ,function 'ad-advice-info ,advice-info)) | 1901 | `(put ,function 'ad-advice-info ,advice-info)) |
| 1949 | 1902 | ||
| 1950 | (defmacro ad-copy-advice-info (function) | 1903 | (defmacro ad-copy-advice-info (function) |
| 1951 | `(ad-copy-tree (get ,function 'ad-advice-info))) | 1904 | `(copy-tree (get ,function 'ad-advice-info))) |
| 1952 | 1905 | ||
| 1953 | (defmacro ad-is-advised (function) | 1906 | (defmacro ad-is-advised (function) |
| 1954 | "Return non-nil if FUNCTION has any advice info associated with it. | 1907 | "Return non-nil if FUNCTION has any advice info associated with it. |
| @@ -2022,8 +1975,8 @@ either t or nil, and DEFINITION should be a list of the form | |||
| 2022 | 1975 | ||
| 2023 | (defun ad-has-enabled-advice (function class) | 1976 | (defun ad-has-enabled-advice (function class) |
| 2024 | "True if at least one of FUNCTION's advices in CLASS is enabled." | 1977 | "True if at least one of FUNCTION's advices in CLASS is enabled." |
| 2025 | (ad-dolist (advice (ad-get-advice-info-field function class)) | 1978 | (cl-dolist (advice (ad-get-advice-info-field function class)) |
| 2026 | (if (ad-advice-enabled advice) (ad-do-return t)))) | 1979 | (if (ad-advice-enabled advice) (cl-return t)))) |
| 2027 | 1980 | ||
| 2028 | (defun ad-has-redefining-advice (function) | 1981 | (defun ad-has-redefining-advice (function) |
| 2029 | "True if FUNCTION's advice info defines at least 1 redefining advice. | 1982 | "True if FUNCTION's advice info defines at least 1 redefining advice. |
| @@ -2036,14 +1989,14 @@ Redefining advices affect the construction of an advised definition." | |||
| 2036 | (defun ad-has-any-advice (function) | 1989 | (defun ad-has-any-advice (function) |
| 2037 | "True if the advice info of FUNCTION defines at least one advice." | 1990 | "True if the advice info of FUNCTION defines at least one advice." |
| 2038 | (and (ad-is-advised function) | 1991 | (and (ad-is-advised function) |
| 2039 | (ad-dolist (class ad-advice-classes nil) | 1992 | (cl-dolist (class ad-advice-classes nil) |
| 2040 | (if (ad-get-advice-info-field function class) | 1993 | (if (ad-get-advice-info-field function class) |
| 2041 | (ad-do-return t))))) | 1994 | (cl-return t))))) |
| 2042 | 1995 | ||
| 2043 | (defun ad-get-enabled-advices (function class) | 1996 | (defun ad-get-enabled-advices (function class) |
| 2044 | "Return the list of enabled advices of FUNCTION in CLASS." | 1997 | "Return the list of enabled advices of FUNCTION in CLASS." |
| 2045 | (let (enabled-advices) | 1998 | (let (enabled-advices) |
| 2046 | (ad-dolist (advice (ad-get-advice-info-field function class)) | 1999 | (dolist (advice (ad-get-advice-info-field function class)) |
| 2047 | (if (ad-advice-enabled advice) | 2000 | (if (ad-advice-enabled advice) |
| 2048 | (push advice enabled-advices))) | 2001 | (push advice enabled-advices))) |
| 2049 | (reverse enabled-advices))) | 2002 | (reverse enabled-advices))) |
| @@ -2151,7 +2104,7 @@ function at point for which PREDICATE returns non-nil)." | |||
| 2151 | (ad-do-advised-functions (function) | 2104 | (ad-do-advised-functions (function) |
| 2152 | (if (or (null predicate) | 2105 | (if (or (null predicate) |
| 2153 | (funcall predicate function)) | 2106 | (funcall predicate function)) |
| 2154 | (ad-do-return function))) | 2107 | (cl-return function))) |
| 2155 | (error "ad-read-advised-function: %s" | 2108 | (error "ad-read-advised-function: %s" |
| 2156 | "There are no qualifying advised functions"))) | 2109 | "There are no qualifying advised functions"))) |
| 2157 | (let* ((ad-pReDiCaTe predicate) | 2110 | (let* ((ad-pReDiCaTe predicate) |
| @@ -2184,9 +2137,9 @@ be returned on empty input (defaults to the first non-empty advice | |||
| 2184 | class of FUNCTION)." | 2137 | class of FUNCTION)." |
| 2185 | (setq default | 2138 | (setq default |
| 2186 | (or default | 2139 | (or default |
| 2187 | (ad-dolist (class ad-advice-classes) | 2140 | (cl-dolist (class ad-advice-classes) |
| 2188 | (if (ad-get-advice-info-field function class) | 2141 | (if (ad-get-advice-info-field function class) |
| 2189 | (ad-do-return class))) | 2142 | (cl-return class))) |
| 2190 | (error "ad-read-advice-class: `%s' has no advices" function))) | 2143 | (error "ad-read-advice-class: `%s' has no advices" function))) |
| 2191 | (let ((class (completing-read | 2144 | (let ((class (completing-read |
| 2192 | (format "%s (default %s): " (or prompt "Class") default) | 2145 | (format "%s (default %s): " (or prompt "Class") default) |
| @@ -2255,18 +2208,18 @@ NAME can be a symbol or a regular expression matching part of an advice name. | |||
| 2255 | If CLASS is `any' all valid advice classes will be checked." | 2208 | If CLASS is `any' all valid advice classes will be checked." |
| 2256 | (if (ad-is-advised function) | 2209 | (if (ad-is-advised function) |
| 2257 | (let (found-advice) | 2210 | (let (found-advice) |
| 2258 | (ad-dolist (advice-class ad-advice-classes) | 2211 | (cl-dolist (advice-class ad-advice-classes) |
| 2259 | (if (or (eq class 'any) (eq advice-class class)) | 2212 | (if (or (eq class 'any) (eq advice-class class)) |
| 2260 | (setq found-advice | 2213 | (setq found-advice |
| 2261 | (ad-dolist (advice (ad-get-advice-info-field | 2214 | (cl-dolist (advice (ad-get-advice-info-field |
| 2262 | function advice-class)) | 2215 | function advice-class)) |
| 2263 | (if (or (and (stringp name) | 2216 | (if (or (and (stringp name) |
| 2264 | (string-match | 2217 | (string-match |
| 2265 | name (symbol-name | 2218 | name (symbol-name |
| 2266 | (ad-advice-name advice)))) | 2219 | (ad-advice-name advice)))) |
| 2267 | (eq name (ad-advice-name advice))) | 2220 | (eq name (ad-advice-name advice))) |
| 2268 | (ad-do-return advice))))) | 2221 | (cl-return advice))))) |
| 2269 | (if found-advice (ad-do-return found-advice)))))) | 2222 | (if found-advice (cl-return found-advice)))))) |
| 2270 | 2223 | ||
| 2271 | (defun ad-enable-advice-internal (function class name flag) | 2224 | (defun ad-enable-advice-internal (function class name flag) |
| 2272 | "Set enable FLAG of FUNCTION's advices in CLASS matching NAME. | 2225 | "Set enable FLAG of FUNCTION's advices in CLASS matching NAME. |
| @@ -2277,10 +2230,10 @@ considered. The number of changed advices will be returned (or nil if | |||
| 2277 | FUNCTION was not advised)." | 2230 | FUNCTION was not advised)." |
| 2278 | (if (ad-is-advised function) | 2231 | (if (ad-is-advised function) |
| 2279 | (let ((matched-advices 0)) | 2232 | (let ((matched-advices 0)) |
| 2280 | (ad-dolist (advice-class ad-advice-classes) | 2233 | (dolist (advice-class ad-advice-classes) |
| 2281 | (if (or (eq class 'any) (eq advice-class class)) | 2234 | (if (or (eq class 'any) (eq advice-class class)) |
| 2282 | (ad-dolist (advice (ad-get-advice-info-field | 2235 | (dolist (advice (ad-get-advice-info-field |
| 2283 | function advice-class)) | 2236 | function advice-class)) |
| 2284 | (cond ((or (and (stringp name) | 2237 | (cond ((or (and (stringp name) |
| 2285 | (string-match | 2238 | (string-match |
| 2286 | name (symbol-name (ad-advice-name advice)))) | 2239 | name (symbol-name (ad-advice-name advice)))) |
| @@ -2586,11 +2539,6 @@ For that it has to be fbound with a non-autoload definition." | |||
| 2586 | (byte-compile symbol) | 2539 | (byte-compile symbol) |
| 2587 | (fset function (symbol-function symbol)))))) | 2540 | (fset function (symbol-function symbol)))))) |
| 2588 | 2541 | ||
| 2589 | (defun ad-prognify (forms) | ||
| 2590 | (cond ((<= (length forms) 1) | ||
| 2591 | (car forms)) | ||
| 2592 | (t (cons 'progn forms)))) | ||
| 2593 | |||
| 2594 | ;; @@@ Accessing argument lists: | 2542 | ;; @@@ Accessing argument lists: |
| 2595 | ;; ============================= | 2543 | ;; ============================= |
| 2596 | 2544 | ||
| @@ -2868,8 +2816,8 @@ in any of these classes." | |||
| 2868 | (if origdoc (setq paragraphs (list origdoc))) | 2816 | (if origdoc (setq paragraphs (list origdoc))) |
| 2869 | (unless (eq style 'plain) | 2817 | (unless (eq style 'plain) |
| 2870 | (push (concat "This " origtype " is advised.") paragraphs)) | 2818 | (push (concat "This " origtype " is advised.") paragraphs)) |
| 2871 | (ad-dolist (class ad-advice-classes) | 2819 | (dolist (class ad-advice-classes) |
| 2872 | (ad-dolist (advice (ad-get-enabled-advices function class)) | 2820 | (dolist (advice (ad-get-enabled-advices function class)) |
| 2873 | (setq advice-docstring | 2821 | (setq advice-docstring |
| 2874 | (ad-make-single-advice-docstring advice class style)) | 2822 | (ad-make-single-advice-docstring advice class style)) |
| 2875 | (if advice-docstring | 2823 | (if advice-docstring |
| @@ -2891,24 +2839,24 @@ in any of these classes." | |||
| 2891 | 2839 | ||
| 2892 | (defun ad-advised-arglist (function) | 2840 | (defun ad-advised-arglist (function) |
| 2893 | "Find first defined arglist in FUNCTION's redefining advices." | 2841 | "Find first defined arglist in FUNCTION's redefining advices." |
| 2894 | (ad-dolist (advice (append (ad-get-enabled-advices function 'before) | 2842 | (cl-dolist (advice (append (ad-get-enabled-advices function 'before) |
| 2895 | (ad-get-enabled-advices function 'around) | 2843 | (ad-get-enabled-advices function 'around) |
| 2896 | (ad-get-enabled-advices function 'after))) | 2844 | (ad-get-enabled-advices function 'after))) |
| 2897 | (let ((arglist (ad-arglist (ad-advice-definition advice)))) | 2845 | (let ((arglist (ad-arglist (ad-advice-definition advice)))) |
| 2898 | (if arglist | 2846 | (if arglist |
| 2899 | ;; We found the first one, use it: | 2847 | ;; We found the first one, use it: |
| 2900 | (ad-do-return arglist))))) | 2848 | (cl-return arglist))))) |
| 2901 | 2849 | ||
| 2902 | (defun ad-advised-interactive-form (function) | 2850 | (defun ad-advised-interactive-form (function) |
| 2903 | "Find first interactive form in FUNCTION's redefining advices." | 2851 | "Find first interactive form in FUNCTION's redefining advices." |
| 2904 | (ad-dolist (advice (append (ad-get-enabled-advices function 'before) | 2852 | (cl-dolist (advice (append (ad-get-enabled-advices function 'before) |
| 2905 | (ad-get-enabled-advices function 'around) | 2853 | (ad-get-enabled-advices function 'around) |
| 2906 | (ad-get-enabled-advices function 'after))) | 2854 | (ad-get-enabled-advices function 'after))) |
| 2907 | (let ((interactive-form | 2855 | (let ((interactive-form |
| 2908 | (ad-interactive-form (ad-advice-definition advice)))) | 2856 | (ad-interactive-form (ad-advice-definition advice)))) |
| 2909 | (if interactive-form | 2857 | (if interactive-form |
| 2910 | ;; We found the first one, use it: | 2858 | ;; We found the first one, use it: |
| 2911 | (ad-do-return interactive-form))))) | 2859 | (cl-return interactive-form))))) |
| 2912 | 2860 | ||
| 2913 | ;; @@@ Putting it all together: | 2861 | ;; @@@ Putting it all together: |
| 2914 | ;; ============================ | 2862 | ;; ============================ |
| @@ -2997,47 +2945,47 @@ and BEFORES, AROUNDS and AFTERS are the lists of advices with which ORIG | |||
| 2997 | should be modified. The assembled function will be returned." | 2945 | should be modified. The assembled function will be returned." |
| 2998 | 2946 | ||
| 2999 | (let (before-forms around-form around-form-protected after-forms definition) | 2947 | (let (before-forms around-form around-form-protected after-forms definition) |
| 3000 | (ad-dolist (advice befores) | 2948 | (dolist (advice befores) |
| 3001 | (cond ((and (ad-advice-protected advice) | 2949 | (cond ((and (ad-advice-protected advice) |
| 3002 | before-forms) | 2950 | before-forms) |
| 3003 | (setq before-forms | 2951 | (setq before-forms |
| 3004 | `((unwind-protect | 2952 | `((unwind-protect |
| 3005 | ,(ad-prognify before-forms) | 2953 | ,(macroexp-progn before-forms) |
| 3006 | ,@(ad-body-forms | 2954 | ,@(ad-body-forms |
| 3007 | (ad-advice-definition advice)))))) | 2955 | (ad-advice-definition advice)))))) |
| 3008 | (t (setq before-forms | 2956 | (t (setq before-forms |
| 3009 | (append before-forms | 2957 | (append before-forms |
| 3010 | (ad-body-forms (ad-advice-definition advice))))))) | 2958 | (ad-body-forms (ad-advice-definition advice))))))) |
| 3011 | 2959 | ||
| 3012 | (setq around-form `(setq ad-return-value ,orig)) | 2960 | (setq around-form `(setq ad-return-value ,orig)) |
| 3013 | (ad-dolist (advice (reverse arounds)) | 2961 | (dolist (advice (reverse arounds)) |
| 3014 | ;; If any of the around advices is protected then we | 2962 | ;; If any of the around advices is protected then we |
| 3015 | ;; protect the complete around advice onion: | 2963 | ;; protect the complete around advice onion: |
| 3016 | (if (ad-advice-protected advice) | 2964 | (if (ad-advice-protected advice) |
| 3017 | (setq around-form-protected t)) | 2965 | (setq around-form-protected t)) |
| 3018 | (setq around-form | 2966 | (setq around-form |
| 3019 | (ad-substitute-tree | 2967 | (ad-substitute-tree |
| 3020 | (function (lambda (form) (eq form 'ad-do-it))) | 2968 | (function (lambda (form) (eq form 'ad-do-it))) |
| 3021 | (function (lambda (form) around-form)) | 2969 | (function (lambda (form) around-form)) |
| 3022 | (ad-prognify (ad-body-forms (ad-advice-definition advice)))))) | 2970 | (macroexp-progn (ad-body-forms (ad-advice-definition advice)))))) |
| 3023 | 2971 | ||
| 3024 | (setq after-forms | 2972 | (setq after-forms |
| 3025 | (if (and around-form-protected before-forms) | 2973 | (if (and around-form-protected before-forms) |
| 3026 | `((unwind-protect | 2974 | `((unwind-protect |
| 3027 | ,(ad-prognify before-forms) | 2975 | ,(macroexp-progn before-forms) |
| 3028 | ,around-form)) | 2976 | ,around-form)) |
| 3029 | (append before-forms (list around-form)))) | 2977 | (append before-forms (list around-form)))) |
| 3030 | (ad-dolist (advice afters) | 2978 | (dolist (advice afters) |
| 3031 | (cond ((and (ad-advice-protected advice) | 2979 | (cond ((and (ad-advice-protected advice) |
| 3032 | after-forms) | 2980 | after-forms) |
| 3033 | (setq after-forms | 2981 | (setq after-forms |
| 3034 | `((unwind-protect | 2982 | `((unwind-protect |
| 3035 | ,(ad-prognify after-forms) | 2983 | ,(macroexp-progn after-forms) |
| 3036 | ,@(ad-body-forms | 2984 | ,@(ad-body-forms |
| 3037 | (ad-advice-definition advice)))))) | 2985 | (ad-advice-definition advice)))))) |
| 3038 | (t (setq after-forms | 2986 | (t (setq after-forms |
| 3039 | (append after-forms | 2987 | (append after-forms |
| 3040 | (ad-body-forms (ad-advice-definition advice))))))) | 2988 | (ad-body-forms (ad-advice-definition advice))))))) |
| 3041 | 2989 | ||
| 3042 | (setq definition | 2990 | (setq definition |
| 3043 | `(,@(if (memq type '(macro special-form)) '(macro)) | 2991 | `(,@(if (memq type '(macro special-form)) '(macro)) |
| @@ -3061,7 +3009,7 @@ should be modified. The assembled function will be returned." | |||
| 3061 | (ad-body-forms (ad-advice-definition advice)))) | 3009 | (ad-body-forms (ad-advice-definition advice)))) |
| 3062 | (ad-get-enabled-advices function hook-name)))) | 3010 | (ad-get-enabled-advices function hook-name)))) |
| 3063 | (if hook-forms | 3011 | (if hook-forms |
| 3064 | (ad-prognify (apply 'append hook-forms))))) | 3012 | (macroexp-progn (apply 'append hook-forms))))) |
| 3065 | 3013 | ||
| 3066 | 3014 | ||
| 3067 | ;; @@ Caching: | 3015 | ;; @@ Caching: |
| @@ -3171,11 +3119,11 @@ advised definition from scratch." | |||
| 3171 | (nth 2 cache-id))))) | 3119 | (nth 2 cache-id))))) |
| 3172 | 3120 | ||
| 3173 | (defun ad-verify-cache-class-id (cache-class-id advices) | 3121 | (defun ad-verify-cache-class-id (cache-class-id advices) |
| 3174 | (ad-dolist (advice advices (null cache-class-id)) | 3122 | (cl-dolist (advice advices (null cache-class-id)) |
| 3175 | (if (ad-advice-enabled advice) | 3123 | (if (ad-advice-enabled advice) |
| 3176 | (if (eq (car cache-class-id) (ad-advice-name advice)) | 3124 | (if (eq (car cache-class-id) (ad-advice-name advice)) |
| 3177 | (setq cache-class-id (cdr cache-class-id)) | 3125 | (setq cache-class-id (cdr cache-class-id)) |
| 3178 | (ad-do-return nil))))) | 3126 | (cl-return nil))))) |
| 3179 | 3127 | ||
| 3180 | ;; There should be a way to monitor if and why a cache verification failed | 3128 | ;; There should be a way to monitor if and why a cache verification failed |
| 3181 | ;; in order to determine whether a certain preactivation could be used or | 3129 | ;; in order to determine whether a certain preactivation could be used or |
| @@ -3670,7 +3618,16 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation. | |||
| 3670 | usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) | 3618 | usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) |
| 3671 | [DOCSTRING] [INTERACTIVE-FORM] | 3619 | [DOCSTRING] [INTERACTIVE-FORM] |
| 3672 | BODY...)" | 3620 | BODY...)" |
| 3673 | (declare (doc-string 3)) | 3621 | (declare (doc-string 3) |
| 3622 | (debug (&define name ;; thing being advised. | ||
| 3623 | (name ;; class is [&or "before" "around" "after" | ||
| 3624 | ;; "activation" "deactivation"] | ||
| 3625 | name ;; name of advice | ||
| 3626 | &rest sexp ;; optional position and flags | ||
| 3627 | ) | ||
| 3628 | [&optional stringp] | ||
| 3629 | [&optional ("interactive" interactive)] | ||
| 3630 | def-body))) | ||
| 3674 | (if (not (ad-name-p function)) | 3631 | (if (not (ad-name-p function)) |
| 3675 | (error "defadvice: Invalid function name: %s" function)) | 3632 | (error "defadvice: Invalid function name: %s" function)) |
| 3676 | (let* ((class (car args)) | 3633 | (let* ((class (car args)) |
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index d1382f42b19..93e890a20c9 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -312,7 +312,7 @@ This uses `defvaralias' and `make-obsolete-variable' (which see). | |||
| 312 | See the Info node `(elisp)Variable Aliases' for more details. | 312 | See the Info node `(elisp)Variable Aliases' for more details. |
| 313 | 313 | ||
| 314 | If CURRENT-NAME is a defcustom (more generally, any variable | 314 | If CURRENT-NAME is a defcustom (more generally, any variable |
| 315 | where OBSOLETE-NAME may be set, e.g. in a .emacs file, before the | 315 | where OBSOLETE-NAME may be set, e.g. in an init file, before the |
| 316 | alias is defined), then the define-obsolete-variable-alias | 316 | alias is defined), then the define-obsolete-variable-alias |
| 317 | statement should be evaluated before the defcustom, if user | 317 | statement should be evaluated before the defcustom, if user |
| 318 | customizations are to be respected. The simplest way to achieve | 318 | customizations are to be respected. The simplest way to achieve |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 10bc37c6dcd..c42ae21aae5 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1016,6 +1016,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." | |||
| 1016 | ((bufferp byte-compile-current-file) | 1016 | ((bufferp byte-compile-current-file) |
| 1017 | (format "Buffer %s:" | 1017 | (format "Buffer %s:" |
| 1018 | (buffer-name byte-compile-current-file))) | 1018 | (buffer-name byte-compile-current-file))) |
| 1019 | ;; We might be simply loading a file that | ||
| 1020 | ;; contains explicit calls to byte-compile functions. | ||
| 1021 | ((stringp load-file-name) | ||
| 1022 | (format "%s:" (file-relative-name load-file-name dir))) | ||
| 1019 | (t ""))) | 1023 | (t ""))) |
| 1020 | (pos (if (and byte-compile-current-file | 1024 | (pos (if (and byte-compile-current-file |
| 1021 | (integerp byte-compile-read-position)) | 1025 | (integerp byte-compile-read-position)) |
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 532c81c502c..5749ff91b40 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el | |||
| @@ -121,7 +121,7 @@ a future Emacs interpreter will be able to use it.") | |||
| 121 | 121 | ||
| 122 | ;;; Generalized variables. | 122 | ;;; Generalized variables. |
| 123 | ;; These macros are defined here so that they | 123 | ;; These macros are defined here so that they |
| 124 | ;; can safely be used in .emacs files. | 124 | ;; can safely be used in init files. |
| 125 | 125 | ||
| 126 | (defmacro cl-incf (place &optional x) | 126 | (defmacro cl-incf (place &optional x) |
| 127 | "Increment PLACE by X (1 by default). | 127 | "Increment PLACE by X (1 by default). |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 774b4d3d600..e002dbabe49 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -75,9 +75,9 @@ window previously showing the debugger buffer. | |||
| 75 | The value used here is passed to `quit-restore-window'." | 75 | The value used here is passed to `quit-restore-window'." |
| 76 | :type '(choice | 76 | :type '(choice |
| 77 | (const :tag "Keep alive" nil) | 77 | (const :tag "Keep alive" nil) |
| 78 | (const :tag "Append" 'append) | 78 | (const :tag "Append" append) |
| 79 | (const :tag "Bury" 'bury) | 79 | (const :tag "Bury" bury) |
| 80 | (const :tag "Kill" 'kill)) | 80 | (const :tag "Kill" kill)) |
| 81 | :group 'debugger | 81 | :group 'debugger |
| 82 | :version "24.2") | 82 | :version "24.2") |
| 83 | 83 | ||
| @@ -265,7 +265,8 @@ first will be printed into the backtrace buffer." | |||
| 265 | ;; Make sure we unbind buffer-read-only in the right buffer. | 265 | ;; Make sure we unbind buffer-read-only in the right buffer. |
| 266 | (save-excursion | 266 | (save-excursion |
| 267 | (recursive-edit)))) | 267 | (recursive-edit)))) |
| 268 | (when (and (window-live-p debugger-window) | 268 | (when (and (not debugger-will-be-back) |
| 269 | (window-live-p debugger-window) | ||
| 269 | (eq (window-buffer debugger-window) debugger-buffer)) | 270 | (eq (window-buffer debugger-window) debugger-buffer)) |
| 270 | ;; Record height of debugger window. | 271 | ;; Record height of debugger window. |
| 271 | (setq debugger-previous-window-height | 272 | (setq debugger-previous-window-height |
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 7f9f8a33634..939fab78942 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -148,7 +148,7 @@ unselectable text. A string consisting solely of hyphens is displayed | |||
| 148 | as a solid horizontal line. | 148 | as a solid horizontal line. |
| 149 | 149 | ||
| 150 | A menu item can be a list with the same format as MENU. This is a submenu." | 150 | A menu item can be a list with the same format as MENU. This is a submenu." |
| 151 | (declare (indent defun)) | 151 | (declare (indent defun) (debug (symbolp body))) |
| 152 | `(progn | 152 | `(progn |
| 153 | ,(if symbol `(defvar ,symbol nil ,doc)) | 153 | ,(if symbol `(defvar ,symbol nil ,doc)) |
| 154 | (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu))) | 154 | (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu))) |
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index a66d5972d82..2248dde8c03 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -28,8 +28,8 @@ | |||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | ;; Layout of a timer vector: | 30 | ;; Layout of a timer vector: |
| 31 | ;; [triggered-p high-seconds low-seconds usecs psecs repeat-delay | 31 | ;; [triggered-p high-seconds low-seconds usecs repeat-delay |
| 32 | ;; function args idle-delay] | 32 | ;; function args idle-delay psecs] |
| 33 | ;; triggered-p is nil if the timer is active (waiting to be triggered), | 33 | ;; triggered-p is nil if the timer is active (waiting to be triggered), |
| 34 | ;; t if it is inactive ("already triggered", in theory) | 34 | ;; t if it is inactive ("already triggered", in theory) |
| 35 | 35 | ||
| @@ -42,7 +42,7 @@ | |||
| 42 | (:type vector) | 42 | (:type vector) |
| 43 | (:conc-name timer--)) | 43 | (:conc-name timer--)) |
| 44 | (triggered t) | 44 | (triggered t) |
| 45 | high-seconds low-seconds usecs psecs repeat-delay function args idle-delay) | 45 | high-seconds low-seconds usecs repeat-delay function args idle-delay psecs) |
| 46 | 46 | ||
| 47 | (defun timerp (object) | 47 | (defun timerp (object) |
| 48 | "Return t if OBJECT is a timer." | 48 | "Return t if OBJECT is a timer." |
diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index 7fc24773b9e..87b6bcf0aa9 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | 61 | ||
| 62 | ;; emacs -q -l edt-mapper.el | 62 | ;; emacs -q -l edt-mapper.el |
| 63 | 63 | ||
| 64 | ;; The "-q" option prevents loading of your .emacs file (commands | 64 | ;; The "-q" option prevents loading of your init file (commands |
| 65 | ;; therein might confuse this program). | 65 | ;; therein might confuse this program). |
| 66 | 66 | ||
| 67 | ;; An instruction screen showing the typical LK-201 terminal | 67 | ;; An instruction screen showing the typical LK-201 terminal |
| @@ -74,7 +74,7 @@ | |||
| 74 | ;; and loaded automatically when the EDT emulation is started. If | 74 | ;; and loaded automatically when the EDT emulation is started. If |
| 75 | ;; you specify a different file name, you will need to set the | 75 | ;; you specify a different file name, you will need to set the |
| 76 | ;; variable "edt-keys-file" before starting the EDT emulation. | 76 | ;; variable "edt-keys-file" before starting the EDT emulation. |
| 77 | ;; Here's how you might go about doing that in your .emacs file. | 77 | ;; Here's how you might go about doing that in your init file: |
| 78 | 78 | ||
| 79 | ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) | 79 | ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) |
| 80 | 80 | ||
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index dbd13a01a8b..3810dcccbb3 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | ;; You can have the EDT Emulation start up automatically, each time | 49 | ;; You can have the EDT Emulation start up automatically, each time |
| 50 | ;; you initiate a GNU Emacs session, by adding the following line to | 50 | ;; you initiate a GNU Emacs session, by adding the following line to |
| 51 | ;; your .emacs file: | 51 | ;; your init file: |
| 52 | ;; | 52 | ;; |
| 53 | ;; (add-hook term-setup-hook 'edt-emulation-on) | 53 | ;; (add-hook term-setup-hook 'edt-emulation-on) |
| 54 | 54 | ||
| @@ -75,7 +75,7 @@ | |||
| 75 | ;; default, this feature is enabled, with the top margin set to | 75 | ;; default, this feature is enabled, with the top margin set to |
| 76 | ;; 10% of the window and the bottom margin set to 15% of the | 76 | ;; 10% of the window and the bottom margin set to 15% of the |
| 77 | ;; window. To change these settings, you can invoke the function | 77 | ;; window. To change these settings, you can invoke the function |
| 78 | ;; edt-set-scroll-margins in your .emacs file. For example, the | 78 | ;; edt-set-scroll-margins in your init file. For example, the |
| 79 | ;; following line | 79 | ;; following line |
| 80 | ;; | 80 | ;; |
| 81 | ;; (edt-set-scroll-margins "20%" "25%") | 81 | ;; (edt-set-scroll-margins "20%" "25%") |
| @@ -363,7 +363,7 @@ This means that an edt-user.el file was found in the user's `load-path'.") | |||
| 363 | ;;; | 363 | ;;; |
| 364 | ;;; (setq edt-keep-current-page-delimiter t) | 364 | ;;; (setq edt-keep-current-page-delimiter t) |
| 365 | ;;; | 365 | ;;; |
| 366 | ;;; in your .emacs file. | 366 | ;;; in your init file. |
| 367 | 367 | ||
| 368 | (defun edt-page-forward (num) | 368 | (defun edt-page-forward (num) |
| 369 | "Move forward to just after next page delimiter. | 369 | "Move forward to just after next page delimiter. |
| @@ -1961,14 +1961,14 @@ created." | |||
| 1961 | Ack!! You're running the Enhanced EDT Emulation without loading an | 1961 | Ack!! You're running the Enhanced EDT Emulation without loading an |
| 1962 | EDT key mapping file. To create an EDT key mapping file, run the | 1962 | EDT key mapping file. To create an EDT key mapping file, run the |
| 1963 | edt-mapper program. It is safest to run it from an Emacs loaded | 1963 | edt-mapper program. It is safest to run it from an Emacs loaded |
| 1964 | without any of your own customizations found in your .emacs file, etc. | 1964 | without any of your own customizations found in your init file, etc. |
| 1965 | The reason for this is that some user customizations confuse edt-mapper. | 1965 | The reason for this is that some user customizations confuse edt-mapper. |
| 1966 | You can do this by quitting Emacs and then invoking Emacs again as | 1966 | You can do this by quitting Emacs and then invoking Emacs again as |
| 1967 | follows: | 1967 | follows: |
| 1968 | 1968 | ||
| 1969 | emacs -q -l edt-mapper | 1969 | emacs -q -l edt-mapper |
| 1970 | 1970 | ||
| 1971 | [NOTE: If you do nothing out of the ordinary in your .emacs file, and | 1971 | [NOTE: If you do nothing out of the ordinary in your init file, and |
| 1972 | the search for edt-mapper is successful, you can try running it now.] | 1972 | the search for edt-mapper is successful, you can try running it now.] |
| 1973 | 1973 | ||
| 1974 | The library edt-mapper includes these same directions on how to | 1974 | The library edt-mapper includes these same directions on how to |
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index b8d07e8b744..d375725af56 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el | |||
| @@ -163,8 +163,8 @@ | |||
| 163 | ;; and type `tpu-edt' followed by a carriage return. | 163 | ;; and type `tpu-edt' followed by a carriage return. |
| 164 | 164 | ||
| 165 | ;; If you like TPU-edt and want to use it all the time, you can start | 165 | ;; If you like TPU-edt and want to use it all the time, you can start |
| 166 | ;; TPU-edt using the Emacs initialization file, .emacs. Simply create | 166 | ;; TPU-edt using the Emacs initialization file, .emacs. Simply add |
| 167 | ;; a .emacs file in your home directory containing the line: | 167 | ;; the following line to your init file: |
| 168 | 168 | ||
| 169 | ;; (tpu-edt) | 169 | ;; (tpu-edt) |
| 170 | 170 | ||
| @@ -2440,7 +2440,7 @@ If FILE is nil, try to load a default file. The default file names are | |||
| 2440 | 2440 | ||
| 2441 | 2441 | ||
| 2442 | ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins | 2442 | ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins |
| 2443 | ;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "76f06905db4c5bfb3b86491a51512a0e") | 2443 | ;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "bf5e7322f9a2c324a3bb306415813374") |
| 2444 | ;;; Generated autoloads from tpu-extras.el | 2444 | ;;; Generated autoloads from tpu-extras.el |
| 2445 | 2445 | ||
| 2446 | (autoload 'tpu-cursor-free-mode "tpu-extras" "\ | 2446 | (autoload 'tpu-cursor-free-mode "tpu-extras" "\ |
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 521b189e3bc..4cf9eee037b 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | ;; Use the functions defined here to customize TPU-edt to your tastes by | 27 | ;; Use the functions defined here to customize TPU-edt to your tastes by |
| 28 | ;; setting scroll margins and/or turning on free cursor mode. Here's an | 28 | ;; setting scroll margins and/or turning on free cursor mode. Here's an |
| 29 | ;; example for your .emacs file. | 29 | ;; example for your init file. |
| 30 | 30 | ||
| 31 | ;; (tpu-set-cursor-free) ; Set cursor free. | 31 | ;; (tpu-set-cursor-free) ; Set cursor free. |
| 32 | ;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins. | 32 | ;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins. |
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index ef4e9b305fc..9cced60816c 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el | |||
| @@ -81,7 +81,7 @@ Finally, you will be prompted for the name of the file to store the key | |||
| 81 | definitions. If you chose the default, TPU-edt will find it and load it | 81 | definitions. If you chose the default, TPU-edt will find it and load it |
| 82 | automatically. If you specify a different file name, you will need to | 82 | automatically. If you specify a different file name, you will need to |
| 83 | set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how | 83 | set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how |
| 84 | you might go about doing that in your .emacs file. | 84 | you might go about doing that in your init file. |
| 85 | 85 | ||
| 86 | (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\")) | 86 | (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\")) |
| 87 | (tpu-edt) | 87 | (tpu-edt) |
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 9bf108c8c38..a59dd610c21 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; (if (not (or (eq major-mode 'Info-mode) | 28 | ;; (if (not (or (eq major-mode 'Info-mode) |
| 29 | ;; (eq major-mode 'vi-mode))) | 29 | ;; (eq major-mode 'vi-mode))) |
| 30 | ;; (vi-mode)))))) | 30 | ;; (vi-mode)))))) |
| 31 | ;; 3) In your .emacs file you can define the command "vi-mode" to be "autoload" | 31 | ;; 3) In your init file you can define the command "vi-mode" to be "autoload" |
| 32 | ;; or you can execute the "load" command to load "vi" directly. | 32 | ;; or you can execute the "load" command to load "vi" directly. |
| 33 | ;; 4) Read the comments for command "vi-mode" before you start using it. | 33 | ;; 4) Read the comments for command "vi-mode" before you start using it. |
| 34 | 34 | ||
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 81fbfb0394c..8de253d19b0 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -351,7 +351,7 @@ user decide when to invoke Viper in a major mode." | |||
| 351 | If t, viperize Emacs. If nil -- don't. If `ask', ask the user. | 351 | If t, viperize Emacs. If nil -- don't. If `ask', ask the user. |
| 352 | This variable is used primarily when Viper is being loaded. | 352 | This variable is used primarily when Viper is being loaded. |
| 353 | 353 | ||
| 354 | Must be set in `~/.emacs' before Viper is loaded. | 354 | Must be set in your init file before Viper is loaded. |
| 355 | DO NOT set this variable interactively, unless you are using the customization | 355 | DO NOT set this variable interactively, unless you are using the customization |
| 356 | widget." | 356 | widget." |
| 357 | :type '(choice (const nil) (const t) (const ask)) | 357 | :type '(choice (const nil) (const t) (const ask)) |
| @@ -1173,7 +1173,7 @@ If you wish to Viperize AND make this your way of life, please put | |||
| 1173 | (setq viper-mode t) | 1173 | (setq viper-mode t) |
| 1174 | (require 'viper) | 1174 | (require 'viper) |
| 1175 | 1175 | ||
| 1176 | in your .emacs file (preferably, close to the top). | 1176 | in your init file (preferably, close to the top). |
| 1177 | These two lines must come in the order given. | 1177 | These two lines must come in the order given. |
| 1178 | 1178 | ||
| 1179 | ** Viper users: | 1179 | ** Viper users: |
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index be5b849651c..a16fa5abdd4 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el | |||
| @@ -170,24 +170,26 @@ Don't use this command in Lisp programs!" | |||
| 170 | If no one is selected, symmetric encryption will be performed. " | 170 | If no one is selected, symmetric encryption will be performed. " |
| 171 | recipients) | 171 | recipients) |
| 172 | (if recipients | 172 | (if recipients |
| 173 | (mapcar | 173 | (apply |
| 174 | (lambda (recipient) | 174 | 'nconc |
| 175 | (setq recipient-key | 175 | (mapcar |
| 176 | (epa-mail--find-usable-key | 176 | (lambda (recipient) |
| 177 | (epg-list-keys | 177 | (setq recipient-key |
| 178 | (epg-make-context epa-protocol) | 178 | (epa-mail--find-usable-key |
| 179 | (if (string-match "@" recipient) | 179 | (epg-list-keys |
| 180 | (concat "<" recipient ">") | 180 | (epg-make-context epa-protocol) |
| 181 | recipient)) | 181 | (if (string-match "@" recipient) |
| 182 | 'encrypt)) | 182 | (concat "<" recipient ">") |
| 183 | (unless (or recipient-key | 183 | recipient)) |
| 184 | (y-or-n-p | 184 | 'encrypt)) |
| 185 | (format | 185 | (unless (or recipient-key |
| 186 | "No public key for %s; skip it? " | 186 | (y-or-n-p |
| 187 | recipient))) | 187 | (format |
| 188 | (error "No public key for %s" recipient)) | 188 | "No public key for %s; skip it? " |
| 189 | recipient-key) | 189 | recipient))) |
| 190 | recipients))) | 190 | (error "No public key for %s" recipient)) |
| 191 | (if recipient-key (list recipient-key))) | ||
| 192 | recipients)))) | ||
| 191 | (setq sign (if verbose (y-or-n-p "Sign? "))) | 193 | (setq sign (if verbose (y-or-n-p "Sign? "))) |
| 192 | (if sign | 194 | (if sign |
| 193 | (epa-select-keys context | 195 | (epa-select-keys context |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 37e755e7655..674a6c97eec 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-09-17 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * erc-page.el (erc-page-function): | ||
| 4 | |||
| 5 | * erc-stamp.el (erc-stamp): Doc fix. | ||
| 6 | |||
| 1 | 2012-08-21 Josh Feinstein <jlf@foxtail.org> | 7 | 2012-08-21 Josh Feinstein <jlf@foxtail.org> |
| 2 | 8 | ||
| 3 | * erc-join.el (erc-autojoin-timing): Fix defcustom type. | 9 | * erc-join.el (erc-autojoin-timing): Fix defcustom type. |
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index c8a7fec32bd..a0593dcb743 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | ;; Heavily borrowed from gnus-art.el. Thanks to the original authors. | 26 | ;; Heavily borrowed from gnus-art.el. Thanks to the original authors. |
| 27 | ;; This buttonizes nicks and other stuff to make it all clickable. | 27 | ;; This buttonizes nicks and other stuff to make it all clickable. |
| 28 | ;; To enable, add to your ~/.emacs: | 28 | ;; To enable, add to your init file: |
| 29 | ;; (require 'erc-button) | 29 | ;; (require 'erc-button) |
| 30 | ;; (erc-button-mode 1) | 30 | ;; (erc-button-mode 1) |
| 31 | ;; | 31 | ;; |
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el index 4f6361ee923..c7103d6dc61 100644 --- a/lisp/erc/erc-capab.el +++ b/lisp/erc/erc-capab.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | ;;; Usage: | 49 | ;;; Usage: |
| 50 | 50 | ||
| 51 | ;; Put the following in your ~/.emacs file. | 51 | ;; Put the following in your init file. |
| 52 | 52 | ||
| 53 | ;; (require 'erc-capab) | 53 | ;; (require 'erc-capab) |
| 54 | ;; (erc-capab-identify-mode 1) | 54 | ;; (erc-capab-identify-mode 1) |
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index cac042c0298..de7f2137197 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;; customizable variables. | 29 | ;; customizable variables. |
| 30 | 30 | ||
| 31 | ;; Usage: | 31 | ;; Usage: |
| 32 | ;; Put (erc-match-mode 1) into your ~/.emacs file. | 32 | ;; Put (erc-match-mode 1) into your init file. |
| 33 | 33 | ||
| 34 | ;;; Code: | 34 | ;;; Code: |
| 35 | 35 | ||
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index 44fbc9563d6..355b345492c 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | ;;; Commentary: | 23 | ;;; Commentary: |
| 24 | 24 | ||
| 25 | ;; This module hides quit/join messages if a netsplit occurs. | 25 | ;; This module hides quit/join messages if a netsplit occurs. |
| 26 | ;; To enable, add the following to your ~/.emacs: | 26 | ;; To enable, add the following to your init file: |
| 27 | ;; (require 'erc-netsplit) | 27 | ;; (require 'erc-netsplit) |
| 28 | ;; (erc-netsplit-mode 1) | 28 | ;; (erc-netsplit-mode 1) |
| 29 | 29 | ||
diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el index e6b670c91ba..51ddc33e1c0 100644 --- a/lisp/erc/erc-page.el +++ b/lisp/erc/erc-page.el | |||
| @@ -45,7 +45,7 @@ If nil, this prints the page message in the minibuffer and calls | |||
| 45 | `beep'. If non-nil, it must be a function that takes two arguments: | 45 | `beep'. If non-nil, it must be a function that takes two arguments: |
| 46 | SENDER and MSG, both strings. | 46 | SENDER and MSG, both strings. |
| 47 | 47 | ||
| 48 | Example for your ~/.emacs file: | 48 | Example for your init file: |
| 49 | 49 | ||
| 50 | \(setq erc-page-function | 50 | \(setq erc-page-function |
| 51 | (lambda (sender msg) | 51 | (lambda (sender msg) |
diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el index 04c5885bc3e..6c5804c62a4 100644 --- a/lisp/erc/erc-replace.el +++ b/lisp/erc/erc-replace.el | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | ;; This module allows you to systematically replace text in incoming | 26 | ;; This module allows you to systematically replace text in incoming |
| 27 | ;; messages. Load erc-replace, and customize `erc-replace-alist'. | 27 | ;; messages. Load erc-replace, and customize `erc-replace-alist'. |
| 28 | ;; Then add to your ~/.emacs: | 28 | ;; Then add to your init file: |
| 29 | 29 | ||
| 30 | ;; (require 'erc-replace) | 30 | ;; (require 'erc-replace) |
| 31 | ;; (erc-replace-mode 1) | 31 | ;; (erc-replace-mode 1) |
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index 5831233affe..4ce2f18e041 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el | |||
| @@ -43,7 +43,7 @@ group provides settings related to the format and display | |||
| 43 | of timestamp information in `erc-mode' buffer. | 43 | of timestamp information in `erc-mode' buffer. |
| 44 | 44 | ||
| 45 | For timestamping to be activated, you just need to load `erc-stamp' | 45 | For timestamping to be activated, you just need to load `erc-stamp' |
| 46 | in your .emacs file or interactively using `load-library'." | 46 | in your init file or interactively using `load-library'." |
| 47 | :group 'erc) | 47 | :group 'erc) |
| 48 | 48 | ||
| 49 | (defcustom erc-timestamp-format "[%H:%M]" | 49 | (defcustom erc-timestamp-format "[%H:%M]" |
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 9c56c724224..88a3285730d 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; Highlights keywords and pals (friends), and hides or highlights fools | 26 | ;; Highlights keywords and pals (friends), and hides or highlights fools |
| 27 | ;; (using a dark color). Add to your ~/.emacs: | 27 | ;; (using a dark color). Add to your init file: |
| 28 | 28 | ||
| 29 | ;; (require 'erc-track) | 29 | ;; (require 'erc-track) |
| 30 | ;; (erc-track-mode 1) | 30 | ;; (erc-track-mode 1) |
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 4b62fec95e6..940056b6438 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el | |||
| @@ -133,10 +133,10 @@ Each element of this alias is a list of the form: | |||
| 133 | Where NAME is the textual name of the alias, and DEFINITION is the | 133 | Where NAME is the textual name of the alias, and DEFINITION is the |
| 134 | command string to replace that command with. | 134 | command string to replace that command with. |
| 135 | 135 | ||
| 136 | Note: this list should not be modified in your '.emacs' file. Rather, | 136 | Note: this list should not be modified in your init file. |
| 137 | any desired alias definitions should be declared using the `alias' | 137 | Rather, any desired alias definitions should be declared using |
| 138 | command, which will automatically write them to the file named by | 138 | the `alias' command, which will automatically write them to the |
| 139 | `eshell-aliases-file'.") | 139 | file named by `eshell-aliases-file'.") |
| 140 | 140 | ||
| 141 | (put 'eshell-command-aliases-list 'risky-local-variable t) | 141 | (put 'eshell-command-aliases-list 'risky-local-variable t) |
| 142 | 142 | ||
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 8218e91ddc7..fa0336232f9 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -84,7 +84,7 @@ Numeric form is tested using the regular expression | |||
| 84 | NOTE: If you find that numeric conversions are interfering with the | 84 | NOTE: If you find that numeric conversions are interfering with the |
| 85 | specification of filenames (for example, in calling `find-file', or | 85 | specification of filenames (for example, in calling `find-file', or |
| 86 | some other Lisp function that deals with files, not numbers), add the | 86 | some other Lisp function that deals with files, not numbers), add the |
| 87 | following in your .emacs file: | 87 | following in your init file: |
| 88 | 88 | ||
| 89 | (put 'find-file 'eshell-no-numeric-conversions t) | 89 | (put 'find-file 'eshell-no-numeric-conversions t) |
| 90 | 90 | ||
diff --git a/lisp/ffap.el b/lisp/ffap.el index ebe8b6dee94..f3e8d4c194e 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; README's, MANIFEST's, and so on. Submit bugs or suggestions with | 34 | ;; README's, MANIFEST's, and so on. Submit bugs or suggestions with |
| 35 | ;; M-x ffap-bug. | 35 | ;; M-x ffap-bug. |
| 36 | ;; | 36 | ;; |
| 37 | ;; For the default installation, add this line to your .emacs file: | 37 | ;; For the default installation, add this line to your init file: |
| 38 | ;; | 38 | ;; |
| 39 | ;; (ffap-bindings) ; do default key bindings | 39 | ;; (ffap-bindings) ; do default key bindings |
| 40 | ;; | 40 | ;; |
| @@ -206,7 +206,7 @@ Sensible values are nil, \"news\", or \"mailto\"." | |||
| 206 | ;; those features interesting but not clear winners (a matter of | 206 | ;; those features interesting but not clear winners (a matter of |
| 207 | ;; personal taste) I try to leave options to enable them. Read | 207 | ;; personal taste) I try to leave options to enable them. Read |
| 208 | ;; through this section for features that you like, put an appropriate | 208 | ;; through this section for features that you like, put an appropriate |
| 209 | ;; enabler in your .emacs file. | 209 | ;; enabler in your init file. |
| 210 | 210 | ||
| 211 | (defcustom ffap-dired-wildcards "[*?][^/]*\\'" | 211 | (defcustom ffap-dired-wildcards "[*?][^/]*\\'" |
| 212 | "A regexp matching filename wildcard characters, or nil. | 212 | "A regexp matching filename wildcard characters, or nil. |
diff --git a/lisp/files.el b/lisp/files.el index 4acdb542089..289f5c6b0b6 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -658,22 +658,13 @@ Not actually set up until the first time you use it.") | |||
| 658 | 658 | ||
| 659 | (defun parse-colon-path (search-path) | 659 | (defun parse-colon-path (search-path) |
| 660 | "Explode a search path into a list of directory names. | 660 | "Explode a search path into a list of directory names. |
| 661 | Directories are separated by occurrences of `path-separator' | 661 | Directories are separated by `path-separator' (which is colon in |
| 662 | \(which is colon in GNU and GNU-like systems)." | 662 | GNU and Unix systems). Substitute environment variables into the |
| 663 | ;; We could use split-string here. | 663 | resulting list of directory names." |
| 664 | (and search-path | 664 | (when (stringp search-path) |
| 665 | (let (cd-list (cd-start 0) cd-colon) | 665 | (mapcar (lambda (f) |
| 666 | (setq search-path (concat search-path path-separator)) | 666 | (substitute-in-file-name (file-name-as-directory f))) |
| 667 | (while (setq cd-colon (string-match path-separator search-path cd-start)) | 667 | (split-string search-path path-separator t)))) |
| 668 | (setq cd-list | ||
| 669 | (nconc cd-list | ||
| 670 | (list (if (= cd-start cd-colon) | ||
| 671 | nil | ||
| 672 | (substitute-in-file-name | ||
| 673 | (file-name-as-directory | ||
| 674 | (substring search-path cd-start cd-colon))))))) | ||
| 675 | (setq cd-start (+ cd-colon 1))) | ||
| 676 | cd-list))) | ||
| 677 | 668 | ||
| 678 | (defun cd-absolute (dir) | 669 | (defun cd-absolute (dir) |
| 679 | "Change current directory to given absolute file name DIR." | 670 | "Change current directory to given absolute file name DIR." |
diff --git a/lisp/filesets.el b/lisp/filesets.el index 6c24a4f43d6..a91d8cf0fcb 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | ;; inclusion group (i.e. a base file including other files). | 35 | ;; inclusion group (i.e. a base file including other files). |
| 36 | 36 | ||
| 37 | ;; Usage: | 37 | ;; Usage: |
| 38 | ;; 1. Put (require 'filesets) and (filesets-init) in your .emacs file. | 38 | ;; 1. Put (require 'filesets) and (filesets-init) in your init file. |
| 39 | ;; 2. Type ;; M-x filesets-edit or choose "Edit Filesets" from the menu. | 39 | ;; 2. Type ;; M-x filesets-edit or choose "Edit Filesets" from the menu. |
| 40 | ;; 3. Save your customizations. | 40 | ;; 3. Save your customizations. |
| 41 | 41 | ||
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index 747a4ca018c..b301886de5b 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | ;; | 31 | ;; |
| 32 | ;; To invoke these adjustments, a user need only invoke the function | 32 | ;; To invoke these adjustments, a user need only invoke the function |
| 33 | ;; enable-flow-control-on with a list of terminal types in his/her own | 33 | ;; enable-flow-control-on with a list of terminal types in his/her own |
| 34 | ;; .emacs file. As arguments, give it the names of one or more terminal | 34 | ;; init file. As arguments, give it the names of one or more terminal |
| 35 | ;; types in use by that user which require flow control adjustments. | 35 | ;; types in use by that user which require flow control adjustments. |
| 36 | ;; Here's an example: | 36 | ;; Here's an example: |
| 37 | ;; | 37 | ;; |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 77c21d26535..6404af7703a 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | ;; When this minor mode is on, the faces of the current line are updated with | 37 | ;; When this minor mode is on, the faces of the current line are updated with |
| 38 | ;; every insertion or deletion. | 38 | ;; every insertion or deletion. |
| 39 | ;; | 39 | ;; |
| 40 | ;; To turn Font Lock mode on automatically, add this to your ~/.emacs file: | 40 | ;; To turn Font Lock mode on automatically, add this to your init file: |
| 41 | ;; | 41 | ;; |
| 42 | ;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) | 42 | ;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) |
| 43 | ;; | 43 | ;; |
diff --git a/lisp/frame.el b/lisp/frame.el index c182a964820..0bef358ecfb 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -301,7 +301,7 @@ there (in decreasing order of priority)." | |||
| 301 | ;; existing frame. We need to explicitly include | 301 | ;; existing frame. We need to explicitly include |
| 302 | ;; default-frame-alist in the parameters of the screen we | 302 | ;; default-frame-alist in the parameters of the screen we |
| 303 | ;; create here, so that its new value, gleaned from the user's | 303 | ;; create here, so that its new value, gleaned from the user's |
| 304 | ;; .emacs file, will be applied to the existing screen. | 304 | ;; init file, will be applied to the existing screen. |
| 305 | (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) | 305 | (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) |
| 306 | (assq 'minibuffer window-system-frame-alist) | 306 | (assq 'minibuffer window-system-frame-alist) |
| 307 | (assq 'minibuffer default-frame-alist) | 307 | (assq 'minibuffer default-frame-alist) |
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index cc7963b1711..a97c5649c95 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; | 28 | ;; |
| 29 | ;; INSTALLATION: | 29 | ;; INSTALLATION: |
| 30 | ;; | 30 | ;; |
| 31 | ;; Add this line to your .emacs file: | 31 | ;; Add this line to your init file: |
| 32 | ;; | 32 | ;; |
| 33 | ;; (require 'generic-x) | 33 | ;; (require 'generic-x) |
| 34 | ;; | 34 | ;; |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5644c394f7e..45f23a6d99c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,31 @@ | |||
| 1 | 2012-09-17 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * message.el (message-in-body-p): Don't set mark or modify buffer. | ||
| 4 | |||
| 5 | * mml.el (mml-attach-file): Doc fix. | ||
| 6 | (mml-attach-external, mml-attach-buffer, mml-attach-file): | ||
| 7 | Set mail-encode-mml when in Mail mode. | ||
| 8 | Simplify code to set HEAD and move back to HEAD. | ||
| 9 | (mml-insert-multipart, mml-insert-part): | ||
| 10 | Set mail-encode-mml when in Mail mode. | ||
| 11 | |||
| 12 | 2012-09-13 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 13 | |||
| 14 | * gnus-util.el (gnus-timer--function): New function. | ||
| 15 | |||
| 16 | * gnus-art.el (gnus-article-stop-animations): Use it. | ||
| 17 | |||
| 18 | 2012-09-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 19 | |||
| 20 | Fix glitches caused by addition of psec to timers. | ||
| 21 | * gnus-art.el (gnus-article-stop-animations): Use timer--function | ||
| 22 | rather than raw access to timer vector. | ||
| 23 | |||
| 24 | 2012-09-11 Julien Danjou <julien@danjou.info> | ||
| 25 | |||
| 26 | * gnus-notifications.el (gnus-notifications): Check for nil values in | ||
| 27 | ignored addresses check. | ||
| 28 | |||
| 1 | 2012-09-10 Stefan Monnier <monnier@iro.umontreal.ca> | 29 | 2012-09-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 30 | ||
| 3 | * qp.el (quoted-printable-decode-region): Inline+CSE+strength-reduction. | 31 | * qp.el (quoted-printable-decode-region): Inline+CSE+strength-reduction. |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b9020a40b75..7dcbd61316f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4554,7 +4554,7 @@ commands: | |||
| 4554 | (defun gnus-article-stop-animations () | 4554 | (defun gnus-article-stop-animations () |
| 4555 | (dolist (timer (and (boundp 'timer-list) | 4555 | (dolist (timer (and (boundp 'timer-list) |
| 4556 | timer-list)) | 4556 | timer-list)) |
| 4557 | (when (eq (elt timer 5) 'image-animate-timeout) | 4557 | (when (eq (gnus-timer--function timer) 'image-animate-timeout) |
| 4558 | (cancel-timer timer)))) | 4558 | (cancel-timer timer)))) |
| 4559 | 4559 | ||
| 4560 | (defun gnus-stop-downloads () | 4560 | (defun gnus-stop-downloads () |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 4c5eabab723..f5e1077f8c4 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1964,6 +1964,11 @@ definitions to shadow the loaded ones for use in file byte-compilation." | |||
| 1964 | (defun gnus-bound-and-true-p (sym) | 1964 | (defun gnus-bound-and-true-p (sym) |
| 1965 | (and (boundp sym) (symbol-value sym))) | 1965 | (and (boundp sym) (symbol-value sym))) |
| 1966 | 1966 | ||
| 1967 | (if (fboundp 'timer--function) | ||
| 1968 | (defalias 'gnus-timer--function 'timer--function) | ||
| 1969 | (defun gnus-timer--function (timer) | ||
| 1970 | (elt timer 5))) | ||
| 1971 | |||
| 1967 | (provide 'gnus-util) | 1972 | (provide 'gnus-util) |
| 1968 | 1973 | ||
| 1969 | ;;; gnus-util.el ends here | 1974 | ;;; gnus-util.el ends here |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 42911ce0648..5360f008432 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -3160,8 +3160,12 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." | |||
| 3160 | 3160 | ||
| 3161 | (defun message-in-body-p () | 3161 | (defun message-in-body-p () |
| 3162 | "Return t if point is in the message body." | 3162 | "Return t if point is in the message body." |
| 3163 | (let ((body (save-excursion (message-goto-body)))) | 3163 | (>= (point) |
| 3164 | (>= (point) body))) | 3164 | (save-excursion |
| 3165 | (goto-char (point-min)) | ||
| 3166 | (or (search-forward (concat "\n" mail-header-separator "\n") nil t) | ||
| 3167 | (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t)) | ||
| 3168 | (point)))) | ||
| 3165 | 3169 | ||
| 3166 | (defun message-goto-eoh () | 3170 | (defun message-goto-eoh () |
| 3167 | "Move point to the end of the headers." | 3171 | "Move point to the end of the headers." |
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index cc1aedf1b97..a72962aae0d 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -1305,7 +1305,8 @@ to specify options." | |||
| 1305 | (defun mml-attach-file (file &optional type description disposition) | 1305 | (defun mml-attach-file (file &optional type description disposition) |
| 1306 | "Attach a file to the outgoing MIME message. | 1306 | "Attach a file to the outgoing MIME message. |
| 1307 | The file is not inserted or encoded until you send the message with | 1307 | The file is not inserted or encoded until you send the message with |
| 1308 | `\\[message-send-and-exit]' or `\\[message-send]'. | 1308 | `\\[message-send-and-exit]' or `\\[message-send]' in Message mode, |
| 1309 | or `\\[mail-send-and-exit]' or `\\[mail-send]' in Mail mode. | ||
| 1309 | 1310 | ||
| 1310 | FILE is the name of the file to attach. TYPE is its | 1311 | FILE is the name of the file to attach. TYPE is its |
| 1311 | content-type, a string of the form \"type/subtype\". DESCRIPTION | 1312 | content-type, a string of the form \"type/subtype\". DESCRIPTION |
| @@ -1319,11 +1320,9 @@ body) or \"attachment\" (separate from the body)." | |||
| 1319 | (description (mml-minibuffer-read-description)) | 1320 | (description (mml-minibuffer-read-description)) |
| 1320 | (disposition (mml-minibuffer-read-disposition type nil file))) | 1321 | (disposition (mml-minibuffer-read-disposition type nil file))) |
| 1321 | (list file type description disposition))) | 1322 | (list file type description disposition))) |
| 1322 | ;; Don't move point if this command is invoked inside the message header. | 1323 | ;; If in the message header, attach at the end and leave point unchanged. |
| 1323 | (let ((head (unless (message-in-body-p) | 1324 | (let ((head (unless (message-in-body-p) (point)))) |
| 1324 | (prog1 | 1325 | (if head (goto-char (point-max))) |
| 1325 | (point) | ||
| 1326 | (goto-char (point-max)))))) | ||
| 1327 | (mml-insert-empty-tag 'part | 1326 | (mml-insert-empty-tag 'part |
| 1328 | 'type type | 1327 | 'type type |
| 1329 | ;; icicles redefines read-file-name and returns a | 1328 | ;; icicles redefines read-file-name and returns a |
| @@ -1331,12 +1330,15 @@ body) or \"attachment\" (separate from the body)." | |||
| 1331 | 'filename (mm-substring-no-properties file) | 1330 | 'filename (mm-substring-no-properties file) |
| 1332 | 'disposition (or disposition "attachment") | 1331 | 'disposition (or disposition "attachment") |
| 1333 | 'description description) | 1332 | 'description description) |
| 1333 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1334 | ;; when you send the message. | ||
| 1335 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1336 | (setq mail-encode-mml t)) | ||
| 1334 | (when head | 1337 | (when head |
| 1335 | (unless (prog1 | 1338 | (unless (pos-visible-in-window-p) |
| 1336 | (pos-visible-in-window-p) | ||
| 1337 | (goto-char head)) | ||
| 1338 | (message "The file \"%s\" has been attached at the end of the message" | 1339 | (message "The file \"%s\" has been attached at the end of the message" |
| 1339 | (file-name-nondirectory file)))))) | 1340 | (file-name-nondirectory file))) |
| 1341 | (goto-char head)))) | ||
| 1340 | 1342 | ||
| 1341 | (defun mml-dnd-attach-file (uri action) | 1343 | (defun mml-dnd-attach-file (uri action) |
| 1342 | "Attach a drag and drop file. | 1344 | "Attach a drag and drop file. |
| @@ -1372,21 +1374,22 @@ BUFFER is the name of the buffer to attach. See | |||
| 1372 | (description (mml-minibuffer-read-description)) | 1374 | (description (mml-minibuffer-read-description)) |
| 1373 | (disposition (mml-minibuffer-read-disposition type nil))) | 1375 | (disposition (mml-minibuffer-read-disposition type nil))) |
| 1374 | (list buffer type description disposition))) | 1376 | (list buffer type description disposition))) |
| 1375 | ;; Don't move point if this command is invoked inside the message header. | 1377 | ;; If in the message header, attach at the end and leave point unchanged. |
| 1376 | (let ((head (unless (message-in-body-p) | 1378 | (let ((head (unless (message-in-body-p) (point)))) |
| 1377 | (prog1 | 1379 | (if head (goto-char (point-max))) |
| 1378 | (point) | ||
| 1379 | (goto-char (point-max)))))) | ||
| 1380 | (mml-insert-empty-tag 'part 'type type 'buffer buffer | 1380 | (mml-insert-empty-tag 'part 'type type 'buffer buffer |
| 1381 | 'disposition disposition | 1381 | 'disposition disposition |
| 1382 | 'description description) | 1382 | 'description description) |
| 1383 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1384 | ;; when you send the message. | ||
| 1385 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1386 | (setq mail-encode-mml t)) | ||
| 1383 | (when head | 1387 | (when head |
| 1384 | (unless (prog1 | 1388 | (unless (pos-visible-in-window-p) |
| 1385 | (pos-visible-in-window-p) | ||
| 1386 | (goto-char head)) | ||
| 1387 | (message | 1389 | (message |
| 1388 | "The buffer \"%s\" has been attached at the end of the message" | 1390 | "The buffer \"%s\" has been attached at the end of the message" |
| 1389 | buffer))))) | 1391 | buffer)) |
| 1392 | (goto-char head)))) | ||
| 1390 | 1393 | ||
| 1391 | (defun mml-attach-external (file &optional type description) | 1394 | (defun mml-attach-external (file &optional type description) |
| 1392 | "Attach an external file into the buffer. | 1395 | "Attach an external file into the buffer. |
| @@ -1397,19 +1400,20 @@ TYPE is the MIME type to use." | |||
| 1397 | (type (mml-minibuffer-read-type file)) | 1400 | (type (mml-minibuffer-read-type file)) |
| 1398 | (description (mml-minibuffer-read-description))) | 1401 | (description (mml-minibuffer-read-description))) |
| 1399 | (list file type description))) | 1402 | (list file type description))) |
| 1400 | ;; Don't move point if this command is invoked inside the message header. | 1403 | ;; If in the message header, attach at the end and leave point unchanged. |
| 1401 | (let ((head (unless (message-in-body-p) | 1404 | (let ((head (unless (message-in-body-p) (point)))) |
| 1402 | (prog1 | 1405 | (if head (goto-char (point-max))) |
| 1403 | (point) | ||
| 1404 | (goto-char (point-max)))))) | ||
| 1405 | (mml-insert-empty-tag 'external 'type type 'name file | 1406 | (mml-insert-empty-tag 'external 'type type 'name file |
| 1406 | 'disposition "attachment" 'description description) | 1407 | 'disposition "attachment" 'description description) |
| 1408 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1409 | ;; when you send the message. | ||
| 1410 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1411 | (setq mail-encode-mml t)) | ||
| 1407 | (when head | 1412 | (when head |
| 1408 | (unless (prog1 | 1413 | (unless (pos-visible-in-window-p) |
| 1409 | (pos-visible-in-window-p) | ||
| 1410 | (goto-char head)) | ||
| 1411 | (message "The file \"%s\" has been attached at the end of the message" | 1414 | (message "The file \"%s\" has been attached at the end of the message" |
| 1412 | (file-name-nondirectory file)))))) | 1415 | (file-name-nondirectory file))) |
| 1416 | (goto-char head)))) | ||
| 1413 | 1417 | ||
| 1414 | (defun mml-insert-multipart (&optional type) | 1418 | (defun mml-insert-multipart (&optional type) |
| 1415 | (interactive (if (message-in-body-p) | 1419 | (interactive (if (message-in-body-p) |
| @@ -1422,12 +1426,20 @@ TYPE is the MIME type to use." | |||
| 1422 | (or type | 1426 | (or type |
| 1423 | (setq type "mixed")) | 1427 | (setq type "mixed")) |
| 1424 | (mml-insert-empty-tag "multipart" 'type type) | 1428 | (mml-insert-empty-tag "multipart" 'type type) |
| 1429 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1430 | ;; when you send the message. | ||
| 1431 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1432 | (setq mail-encode-mml t)) | ||
| 1425 | (forward-line -1)) | 1433 | (forward-line -1)) |
| 1426 | 1434 | ||
| 1427 | (defun mml-insert-part (&optional type) | 1435 | (defun mml-insert-part (&optional type) |
| 1428 | (interactive (if (message-in-body-p) | 1436 | (interactive (if (message-in-body-p) |
| 1429 | (list (mml-minibuffer-read-type "")) | 1437 | (list (mml-minibuffer-read-type "")) |
| 1430 | (error "Use this command in the message body"))) | 1438 | (error "Use this command in the message body"))) |
| 1439 | ;; When using Mail mode, make sure it does the mime encoding | ||
| 1440 | ;; when you send the message. | ||
| 1441 | (or (eq mail-user-agent 'message-user-agent) | ||
| 1442 | (setq mail-encode-mml t)) | ||
| 1431 | (mml-insert-tag 'part 'type type 'disposition "inline")) | 1443 | (mml-insert-tag 'part 'type type 'disposition "inline")) |
| 1432 | 1444 | ||
| 1433 | (declare-function message-subscribed-p "message" ()) | 1445 | (declare-function message-subscribed-p "message" ()) |
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 644024a4b86..f92e2ab0af2 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el | |||
| @@ -52,14 +52,14 @@ | |||
| 52 | ;; | 52 | ;; |
| 53 | ;; Setup: | 53 | ;; Setup: |
| 54 | ;; | 54 | ;; |
| 55 | ;; Put the following code in your .emacs file. This turns on | 55 | ;; Put the following code in your init file. This turns on |
| 56 | ;; hi-lock mode and adds a "Regexp Highlighting" entry | 56 | ;; hi-lock mode and adds a "Regexp Highlighting" entry |
| 57 | ;; to the edit menu. | 57 | ;; to the edit menu. |
| 58 | ;; | 58 | ;; |
| 59 | ;; (global-hi-lock-mode 1) | 59 | ;; (global-hi-lock-mode 1) |
| 60 | ;; | 60 | ;; |
| 61 | ;; To enable the use of patterns found in files (presumably placed | 61 | ;; To enable the use of patterns found in files (presumably placed |
| 62 | ;; there by hi-lock) include the following in your .emacs file: | 62 | ;; there by hi-lock) include the following in your init file: |
| 63 | ;; | 63 | ;; |
| 64 | ;; (setq hi-lock-file-patterns-policy 'ask) | 64 | ;; (setq hi-lock-file-patterns-policy 'ask) |
| 65 | ;; | 65 | ;; |
| @@ -356,7 +356,7 @@ Hi-lock: end is found. A mode is excluded if it's in the list | |||
| 356 | "Possible archaic use of (hi-lock-mode). | 356 | "Possible archaic use of (hi-lock-mode). |
| 357 | Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers, | 357 | Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers, |
| 358 | use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs | 358 | use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs |
| 359 | versions before 22 use the following in your .emacs file: | 359 | versions before 22 use the following in your init file: |
| 360 | 360 | ||
| 361 | (if (functionp 'global-hi-lock-mode) | 361 | (if (functionp 'global-hi-lock-mode) |
| 362 | (global-hi-lock-mode 1) | 362 | (global-hi-lock-mode 1) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index c6e799252a2..77461469044 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -123,13 +123,13 @@ own!): | |||
| 123 | no upper limit on its size. The size will also be aligned to the | 123 | no upper limit on its size. The size will also be aligned to the |
| 124 | right. | 124 | right. |
| 125 | 125 | ||
| 126 | Thus, if you wanted to use these two formats, add | 126 | Thus, if you wanted to use these two formats, the appropriate |
| 127 | value for this variable would be | ||
| 127 | 128 | ||
| 128 | (setq ibuffer-formats '((mark \" \" name) | 129 | '((mark \" \" name) |
| 129 | (mark modified read-only | 130 | (mark modified read-only |
| 130 | (name 16 16 :left) (size 6 -1 :right)))) | 131 | (name 16 16 :left) |
| 131 | 132 | (size 6 -1 :right))) | |
| 132 | to your ~/.emacs file. | ||
| 133 | 133 | ||
| 134 | Using \\[ibuffer-switch-format], you can rotate the display between | 134 | Using \\[ibuffer-switch-format], you can rotate the display between |
| 135 | the specified formats in the list." | 135 | the specified formats in the list." |
diff --git a/lisp/ielm.el b/lisp/ielm.el index c93f235d81f..ba05bbcfc0f 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el | |||
| @@ -59,7 +59,7 @@ override the read-only-ness of IELM prompts is to call | |||
| 59 | `comint-kill-whole-line' or `comint-kill-region' with no | 59 | `comint-kill-whole-line' or `comint-kill-region' with no |
| 60 | narrowing in effect. This way you will be certain that none of | 60 | narrowing in effect. This way you will be certain that none of |
| 61 | the remaining prompts will be accidentally messed up. You may | 61 | the remaining prompts will be accidentally messed up. You may |
| 62 | wish to put something like the following in your `.emacs' file: | 62 | wish to put something like the following in your init file: |
| 63 | 63 | ||
| 64 | \(add-hook 'ielm-mode-hook | 64 | \(add-hook 'ielm-mode-hook |
| 65 | (lambda () | 65 | (lambda () |
diff --git a/lisp/image.el b/lisp/image.el index 7801923c3fe..99c0a74a512 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -645,8 +645,8 @@ number, play until that number of seconds has elapsed." | |||
| 645 | (while tail | 645 | (while tail |
| 646 | (setq timer (car tail) | 646 | (setq timer (car tail) |
| 647 | tail (cdr tail)) | 647 | tail (cdr tail)) |
| 648 | (if (and (eq (aref timer 5) 'image-animate-timeout) | 648 | (if (and (eq (timer--function timer) 'image-animate-timeout) |
| 649 | (eq (car-safe (aref timer 6)) image)) | 649 | (eq (car-safe (timer--args timer)) image)) |
| 650 | (setq tail nil) | 650 | (setq tail nil) |
| 651 | (setq timer nil))) | 651 | (setq timer nil))) |
| 652 | timer)) | 652 | timer)) |
diff --git a/lisp/info.el b/lisp/info.el index fe4afd72163..5862e5e850f 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1882,9 +1882,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1882 | (while (and (not give-up) | 1882 | (while (and (not give-up) |
| 1883 | (or (null found) | 1883 | (or (null found) |
| 1884 | (not (funcall isearch-filter-predicate beg-found found)))) | 1884 | (not (funcall isearch-filter-predicate beg-found found)))) |
| 1885 | (let ((search-spaces-regexp | 1885 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) |
| 1886 | (if (or (not isearch-mode) isearch-regexp) | ||
| 1887 | Info-search-whitespace-regexp))) | ||
| 1888 | (if (if backward | 1886 | (if (if backward |
| 1889 | (re-search-backward regexp bound t) | 1887 | (re-search-backward regexp bound t) |
| 1890 | (re-search-forward regexp bound t)) | 1888 | (re-search-forward regexp bound t)) |
| @@ -1904,9 +1902,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1904 | (if (null Info-current-subfile) | 1902 | (if (null Info-current-subfile) |
| 1905 | (if isearch-mode | 1903 | (if isearch-mode |
| 1906 | (signal 'search-failed (list regexp "end of manual")) | 1904 | (signal 'search-failed (list regexp "end of manual")) |
| 1907 | (let ((search-spaces-regexp | 1905 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) |
| 1908 | (if (or (not isearch-mode) isearch-regexp) | ||
| 1909 | Info-search-whitespace-regexp))) | ||
| 1910 | (if backward | 1906 | (if backward |
| 1911 | (re-search-backward regexp) | 1907 | (re-search-backward regexp) |
| 1912 | (re-search-forward regexp)))) | 1908 | (re-search-forward regexp)))) |
| @@ -1964,9 +1960,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1964 | (while (and (not give-up) | 1960 | (while (and (not give-up) |
| 1965 | (or (null found) | 1961 | (or (null found) |
| 1966 | (not (funcall isearch-filter-predicate beg-found found)))) | 1962 | (not (funcall isearch-filter-predicate beg-found found)))) |
| 1967 | (let ((search-spaces-regexp | 1963 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) |
| 1968 | (if (or (not isearch-mode) isearch-regexp) | ||
| 1969 | Info-search-whitespace-regexp))) | ||
| 1970 | (if (if backward | 1964 | (if (if backward |
| 1971 | (re-search-backward regexp nil t) | 1965 | (re-search-backward regexp nil t) |
| 1972 | (re-search-forward regexp nil t)) | 1966 | (re-search-forward regexp nil t)) |
| @@ -2034,21 +2028,26 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 2034 | (defun Info-isearch-search () | 2028 | (defun Info-isearch-search () |
| 2035 | (if Info-isearch-search | 2029 | (if Info-isearch-search |
| 2036 | (lambda (string &optional bound noerror count) | 2030 | (lambda (string &optional bound noerror count) |
| 2037 | (Info-search | 2031 | (let ((Info-search-whitespace-regexp |
| 2038 | (cond | 2032 | (if (if isearch-regexp |
| 2039 | (isearch-word | 2033 | isearch-regexp-lax-whitespace |
| 2040 | ;; Lax version of word search | 2034 | isearch-lax-whitespace) |
| 2041 | (let ((lax (not (or isearch-nonincremental | 2035 | search-whitespace-regexp))) |
| 2042 | (eq (length string) | 2036 | (Info-search |
| 2043 | (length (isearch--state-string | 2037 | (cond |
| 2044 | (car isearch-cmds)))))))) | 2038 | (isearch-word |
| 2045 | (if (functionp isearch-word) | 2039 | ;; Lax version of word search |
| 2046 | (funcall isearch-word string lax) | 2040 | (let ((lax (not (or isearch-nonincremental |
| 2047 | (word-search-regexp string lax)))) | 2041 | (eq (length string) |
| 2048 | (isearch-regexp string) | 2042 | (length (isearch--state-string |
| 2049 | (t (regexp-quote string))) | 2043 | (car isearch-cmds)))))))) |
| 2050 | bound noerror count | 2044 | (if (functionp isearch-word) |
| 2051 | (unless isearch-forward 'backward)) | 2045 | (funcall isearch-word string lax) |
| 2046 | (word-search-regexp string lax)))) | ||
| 2047 | (isearch-regexp string) | ||
| 2048 | (t (regexp-quote string))) | ||
| 2049 | bound noerror count | ||
| 2050 | (unless isearch-forward 'backward))) | ||
| 2052 | (point)) | 2051 | (point)) |
| 2053 | (isearch-search-fun-default))) | 2052 | (isearch-search-fun-default))) |
| 2054 | 2053 | ||
| @@ -4157,8 +4156,6 @@ Advanced commands: | |||
| 4157 | 'Info-isearch-push-state) | 4156 | 'Info-isearch-push-state) |
| 4158 | (set (make-local-variable 'isearch-filter-predicate) | 4157 | (set (make-local-variable 'isearch-filter-predicate) |
| 4159 | 'Info-isearch-filter) | 4158 | 'Info-isearch-filter) |
| 4160 | (set (make-local-variable 'search-whitespace-regexp) | ||
| 4161 | Info-search-whitespace-regexp) | ||
| 4162 | (set (make-local-variable 'revert-buffer-function) | 4159 | (set (make-local-variable 'revert-buffer-function) |
| 4163 | 'Info-revert-buffer-function) | 4160 | 'Info-revert-buffer-function) |
| 4164 | (Info-set-mode-line) | 4161 | (Info-set-mode-line) |
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 39a88001112..3c34e5d9a2a 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el | |||
| @@ -224,13 +224,14 @@ The functions come in the following groups. | |||
| 224 | ogonek-prefix-to-encoding iso8859-2 | 224 | ogonek-prefix-to-encoding iso8859-2 |
| 225 | 225 | ||
| 226 | The above default values can be changed by placing appropriate settings | 226 | The above default values can be changed by placing appropriate settings |
| 227 | in the '~/.emacs' file: | 227 | in your init file: |
| 228 | 228 | ||
| 229 | (setq ogonek-prefix-char ?/) | 229 | (setq ogonek-prefix-char ?/) |
| 230 | (setq ogonek-prefix-to-encoding \"iso8859-2\") | 230 | (setq ogonek-prefix-to-encoding \"iso8859-2\") |
| 231 | 231 | ||
| 232 | Instead of loading the whole library `ogonek' it may be better to | 232 | Instead of loading the whole library `ogonek' it may be better |
| 233 | autoload the needed functions, for example by placing in `~/.emacs': | 233 | to autoload the needed functions, for example by adding the |
| 234 | following lines to your init file: | ||
| 234 | 235 | ||
| 235 | (autoload 'ogonek-how \"ogonek\") | 236 | (autoload 'ogonek-how \"ogonek\") |
| 236 | (autoload 'ogonek-recode-region \"ogonek\") | 237 | (autoload 'ogonek-recode-region \"ogonek\") |
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el index ac2afa373c4..782b5a363ad 100644 --- a/lisp/language/chinese.el +++ b/lisp/language/chinese.el | |||
| @@ -110,7 +110,8 @@ | |||
| 110 | (use-cjk-char-width-table 'zh_CN))) | 110 | (use-cjk-char-width-table 'zh_CN))) |
| 111 | (exit-function . use-default-char-width-table) | 111 | (exit-function . use-default-char-width-table) |
| 112 | (coding-system chinese-iso-8bit iso-2022-cn chinese-hz) | 112 | (coding-system chinese-iso-8bit iso-2022-cn chinese-hz) |
| 113 | (coding-priority chinese-iso-8bit chinese-big5 iso-2022-cn) | 113 | (coding-priority chinese-iso-8bit chinese-gbk chinese-big5 |
| 114 | iso-2022-cn) | ||
| 114 | (input-method . "chinese-py-punct") | 115 | (input-method . "chinese-py-punct") |
| 115 | (features china-util) | 116 | (features china-util) |
| 116 | (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") | 117 | (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") |
| @@ -140,7 +141,8 @@ | |||
| 140 | (use-cjk-char-width-table 'zh_HK))) | 141 | (use-cjk-char-width-table 'zh_HK))) |
| 141 | (exit-function . use-default-char-width-table) | 142 | (exit-function . use-default-char-width-table) |
| 142 | (coding-system chinese-big5 chinese-iso-7bit) | 143 | (coding-system chinese-big5 chinese-iso-7bit) |
| 143 | (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit) | 144 | (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit |
| 145 | chinese-gbk) | ||
| 144 | (input-method . "chinese-py-punct-b5") | 146 | (input-method . "chinese-py-punct-b5") |
| 145 | (ctext-non-standard-encodings "big5-0") | 147 | (ctext-non-standard-encodings "big5-0") |
| 146 | (features china-util) | 148 | (features china-util) |
| @@ -196,7 +198,7 @@ | |||
| 196 | (exit-function . use-default-char-width-table) | 198 | (exit-function . use-default-char-width-table) |
| 197 | (coding-system iso-2022-cn euc-tw) | 199 | (coding-system iso-2022-cn euc-tw) |
| 198 | (coding-priority iso-2022-cn euc-tw chinese-big5 | 200 | (coding-priority iso-2022-cn euc-tw chinese-big5 |
| 199 | chinese-iso-8bit) | 201 | chinese-iso-8bit chinese-gbk) |
| 200 | (features china-util) | 202 | (features china-util) |
| 201 | (input-method . "chinese-cns-quick") | 203 | (input-method . "chinese-cns-quick") |
| 202 | ;; Fixme: presumably it won't accept big5 now. | 204 | ;; Fixme: presumably it won't accept big5 now. |
| @@ -216,7 +218,7 @@ accepts Big5 for input also (which is then converted to CNS).")) | |||
| 216 | (exit-function . use-default-char-width-table) | 218 | (exit-function . use-default-char-width-table) |
| 217 | (coding-system euc-tw iso-2022-cn) | 219 | (coding-system euc-tw iso-2022-cn) |
| 218 | (coding-priority euc-tw chinese-big5 iso-2022-cn | 220 | (coding-priority euc-tw chinese-big5 iso-2022-cn |
| 219 | chinese-iso-8bit) | 221 | chinese-iso-8bit chinese-gbk) |
| 220 | (features china-util) | 222 | (features china-util) |
| 221 | (input-method . "chinese-cns-quick") | 223 | (input-method . "chinese-cns-quick") |
| 222 | (documentation . "\ | 224 | (documentation . "\ |
diff --git a/lisp/locate.el b/lisp/locate.el index 29d7c75cbb2..d172ce3d6c4 100644 --- a/lisp/locate.el +++ b/lisp/locate.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; | 34 | ;; |
| 35 | ;; SHELLPROGRAM Name-to-find | 35 | ;; SHELLPROGRAM Name-to-find |
| 36 | ;; | 36 | ;; |
| 37 | ;; set the variable `locate-command' in your .emacs file. | 37 | ;; set the variable `locate-command' in your init file. |
| 38 | ;; | 38 | ;; |
| 39 | ;; To use a more complicated expression, create a function which | 39 | ;; To use a more complicated expression, create a function which |
| 40 | ;; takes a string (the name to find) as input and returns a list. | 40 | ;; takes a string (the name to find) as input and returns a list. |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 520271940f2..4305094611a 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -139,9 +139,8 @@ | |||
| 139 | ;; feedmail-send-it. Hers's the best way to use the stuff in this | 139 | ;; feedmail-send-it. Hers's the best way to use the stuff in this |
| 140 | ;; file: | 140 | ;; file: |
| 141 | ;; | 141 | ;; |
| 142 | ;; Save this file as feedmail.el somewhere on your elisp | 142 | ;; Save this file as feedmail.el somewhere on your elisp loadpath; |
| 143 | ;; loadpath; byte-compile it. Put the following lines somewhere in | 143 | ;; byte-compile it. Put the following lines in your init file: |
| 144 | ;; your ~/.emacs stuff: | ||
| 145 | ;; | 144 | ;; |
| 146 | ;; (setq send-mail-function 'feedmail-send-it) | 145 | ;; (setq send-mail-function 'feedmail-send-it) |
| 147 | ;; (autoload 'feedmail-send-it "feedmail") | 146 | ;; (autoload 'feedmail-send-it "feedmail") |
diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index dd489e3c6a9..40d67b4e904 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; time. | 28 | ;; time. |
| 29 | ;; | 29 | ;; |
| 30 | ;; To use this package, put it in a directory in your load-path, and | 30 | ;; To use this package, put it in a directory in your load-path, and |
| 31 | ;; put this in your .emacs file: | 31 | ;; put this in your init file: |
| 32 | ;; | 32 | ;; |
| 33 | ;; (load "mail-hist" nil t) | 33 | ;; (load "mail-hist" nil t) |
| 34 | ;; | 34 | ;; |
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 290c57c1c55..2e4ffec1383 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el | |||
| @@ -391,35 +391,24 @@ double-quotes." | |||
| 391 | (defun mail-abbrev-expand-hook () | 391 | (defun mail-abbrev-expand-hook () |
| 392 | "For use as the fourth arg to `define-abbrev'. | 392 | "For use as the fourth arg to `define-abbrev'. |
| 393 | After expanding a mail-abbrev, if Auto Fill mode is on and we're past the | 393 | After expanding a mail-abbrev, if Auto Fill mode is on and we're past the |
| 394 | fill-column, break the line at the previous comma, and indent the next line." | 394 | fill-column, break the line at the previous comma, and indent the next line |
| 395 | ;; Disable abbrev mode to avoid recursion in indent-relative expanding | 395 | with a space." |
| 396 | ;; part of the abbrev expansion as an abbrev itself. | 396 | (when auto-fill-function |
| 397 | (let ((abbrev-mode nil)) | 397 | (let (p) |
| 398 | (save-excursion | 398 | (save-excursion |
| 399 | (let ((p (point)) | 399 | (while (>= (current-column) fill-column) |
| 400 | bol comma fp) | 400 | (while (and (search-backward "," (point-at-bol) 'move) |
| 401 | (beginning-of-line) | 401 | (>= (current-column) (1- fill-column)) |
| 402 | (setq bol (point)) | 402 | (setq p (point)))) |
| 403 | (goto-char p) | 403 | (when (or (not (bolp)) |
| 404 | (while (and auto-fill-function | 404 | (and p (goto-char p))) |
| 405 | (>= (current-column) fill-column) | 405 | (setq p nil) |
| 406 | (search-backward "," bol t)) | 406 | (forward-char 1) |
| 407 | (setq comma (point)) | 407 | (insert "\n") |
| 408 | (forward-char 1) ; Now we are just past the comma. | 408 | (when (looking-at "[\t ]+") |
| 409 | (insert "\n") | 409 | (delete-region (point) (match-end 0))) |
| 410 | (delete-horizontal-space) | 410 | (insert " ") |
| 411 | (setq p (point)) | 411 | (end-of-line))))))) |
| 412 | (indent-relative) | ||
| 413 | (setq fp (buffer-substring p (point))) | ||
| 414 | ;; Go to the end of the new line. | ||
| 415 | (end-of-line) | ||
| 416 | (if (> (current-column) fill-column) | ||
| 417 | ;; It's still too long; do normal auto-fill. | ||
| 418 | (let ((fill-prefix (or fp "\t"))) | ||
| 419 | (do-auto-fill))) | ||
| 420 | ;; Resume the search. | ||
| 421 | (goto-char comma) | ||
| 422 | ))))) | ||
| 423 | 412 | ||
| 424 | ;;; Syntax tables and abbrev-expansion | 413 | ;;; Syntax tables and abbrev-expansion |
| 425 | 414 | ||
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index d88862b2d47..5606e71dea4 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4068,6 +4068,13 @@ The variable `rmail-retry-ignored-headers' is a regular expression | |||
| 4068 | specifying headers which should not be copied into the new message." | 4068 | specifying headers which should not be copied into the new message." |
| 4069 | (interactive) | 4069 | (interactive) |
| 4070 | (require 'mail-utils) | 4070 | (require 'mail-utils) |
| 4071 | (if rmail-enable-mime | ||
| 4072 | (with-current-buffer rmail-buffer | ||
| 4073 | (if (rmail-mime-message-p) | ||
| 4074 | (let ((rmail-mime-mbox-buffer rmail-view-buffer) | ||
| 4075 | (rmail-mime-view-buffer rmail-buffer)) | ||
| 4076 | (rmail-mime-toggle-raw 'raw))))) | ||
| 4077 | |||
| 4071 | (let ((rmail-this-buffer (current-buffer)) | 4078 | (let ((rmail-this-buffer (current-buffer)) |
| 4072 | (msgnum rmail-current-message) | 4079 | (msgnum rmail-current-message) |
| 4073 | bounce-start bounce-end bounce-indent resending | 4080 | bounce-start bounce-end bounce-indent resending |
| @@ -4598,7 +4605,7 @@ With prefix argument N moves forward N messages with these labels. | |||
| 4598 | 4605 | ||
| 4599 | ;;;*** | 4606 | ;;;*** |
| 4600 | 4607 | ||
| 4601 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "cd7656f82944d0b92b0d093a5f3a4c36") | 4608 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "0c18b83f914803d1216e1a9df7ea5275") |
| 4602 | ;;; Generated autoloads from rmailmm.el | 4609 | ;;; Generated autoloads from rmailmm.el |
| 4603 | 4610 | ||
| 4604 | (autoload 'rmail-mime "rmailmm" "\ | 4611 | (autoload 'rmail-mime "rmailmm" "\ |
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 0b837a43d94..e4e066bd642 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el | |||
| @@ -111,6 +111,8 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 111 | ;; Even if the message is in `raw' state, boundaries etc | 111 | ;; Even if the message is in `raw' state, boundaries etc |
| 112 | ;; are still missing. All we can do is insert the real | 112 | ;; are still missing. All we can do is insert the real |
| 113 | ;; raw message. (Bug#9840) | 113 | ;; raw message. (Bug#9840) |
| 114 | ;; FIXME? Since the 2012-09-17 changes to rmail-mime, | ||
| 115 | ;; can we just use that function now? | ||
| 114 | (when (and entity | 116 | (when (and entity |
| 115 | (not (equal "text/plain" | 117 | (not (equal "text/plain" |
| 116 | (car (rmail-mime-entity-type entity))))) | 118 | (car (rmail-mime-entity-type entity))))) |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 67b2e62275f..2cc57963ef7 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -389,13 +389,13 @@ Use `raw' for raw mode, and any other non-nil value for decoded mode." | |||
| 389 | ;; Enter the raw mode. | 389 | ;; Enter the raw mode. |
| 390 | (rmail-mime-raw-mode entity) | 390 | (rmail-mime-raw-mode entity) |
| 391 | ;; Enter the shown mode. | 391 | ;; Enter the shown mode. |
| 392 | (rmail-mime-shown-mode entity)) | 392 | (rmail-mime-shown-mode entity) |
| 393 | (let ((inhibit-read-only t) | 393 | (let ((inhibit-read-only t) |
| 394 | (modified (buffer-modified-p))) | 394 | (modified (buffer-modified-p))) |
| 395 | (save-excursion | 395 | (save-excursion |
| 396 | (goto-char (aref segment 1)) | 396 | (goto-char (aref segment 1)) |
| 397 | (rmail-mime-insert entity) | 397 | (rmail-mime-insert entity) |
| 398 | (restore-buffer-modified-p modified))))) | 398 | (restore-buffer-modified-p modified)))))) |
| 399 | 399 | ||
| 400 | (defun rmail-mime-toggle-hidden () | 400 | (defun rmail-mime-toggle-hidden () |
| 401 | "Hide or show the body of the MIME-entity at point." | 401 | "Hide or show the body of the MIME-entity at point." |
| @@ -1212,7 +1212,7 @@ available." | |||
| 1212 | (if (rmail-mime-display-header current) | 1212 | (if (rmail-mime-display-header current) |
| 1213 | (delete-char (- (aref segment 2) (aref segment 1)))) | 1213 | (delete-char (- (aref segment 2) (aref segment 1)))) |
| 1214 | (insert-buffer-substring rmail-mime-mbox-buffer | 1214 | (insert-buffer-substring rmail-mime-mbox-buffer |
| 1215 | (aref header 0) (aref header 1))) | 1215 | (aref header 0) (aref header 1))) |
| 1216 | ;; tagline | 1216 | ;; tagline |
| 1217 | (if (rmail-mime-display-tagline current) | 1217 | (if (rmail-mime-display-tagline current) |
| 1218 | (delete-char (- (aref segment 3) (aref segment 2)))) | 1218 | (delete-char (- (aref segment 3) (aref segment 2)))) |
| @@ -1261,14 +1261,17 @@ The arguments ARG and STATE have no effect in this case." | |||
| 1261 | (interactive (list current-prefix-arg nil)) | 1261 | (interactive (list current-prefix-arg nil)) |
| 1262 | (if rmail-enable-mime | 1262 | (if rmail-enable-mime |
| 1263 | (with-current-buffer rmail-buffer | 1263 | (with-current-buffer rmail-buffer |
| 1264 | (if (rmail-mime-message-p) | 1264 | (if (or (rmail-mime-message-p) |
| 1265 | (let ((rmail-mime-mbox-buffer rmail-view-buffer) | 1265 | (get-text-property (point-min) 'rmail-mime-hidden)) |
| 1266 | (rmail-mime-view-buffer rmail-buffer) | 1266 | (let* ((hidden (get-text-property (point-min) 'rmail-mime-hidden)) |
| 1267 | (entity (get-text-property | 1267 | (desired-hidden (if state (eq state 'raw) (not hidden)))) |
| 1268 | (progn | 1268 | (unless (eq hidden desired-hidden) |
| 1269 | (or arg (goto-char (point-min))) | 1269 | (if (not desired-hidden) |
| 1270 | (point)) 'rmail-mime-entity))) | 1270 | (rmail-show-message rmail-current-message) |
| 1271 | (if (or (not arg) entity) (rmail-mime-toggle-raw state))) | 1271 | (let ((rmail-enable-mime nil) |
| 1272 | (inhibit-read-only t)) | ||
| 1273 | (rmail-show-message rmail-current-message) | ||
| 1274 | (add-text-properties (point-min) (point-max) '(rmail-mime-hidden t)))))) | ||
| 1272 | (message "Not a MIME message, just toggling headers") | 1275 | (message "Not a MIME message, just toggling headers") |
| 1273 | (rmail-toggle-header))) | 1276 | (rmail-toggle-header))) |
| 1274 | (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string)) | 1277 | (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string)) |
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el index fdfe17a1a07..3d7495ffd1a 100644 --- a/lisp/mail/uce.el +++ b/lisp/mail/uce.el | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | ;; Usage: | 63 | ;; Usage: |
| 64 | 64 | ||
| 65 | ;; Place uce.el in your load-path (and optionally byte-compile it). | 65 | ;; Place uce.el in your load-path (and optionally byte-compile it). |
| 66 | ;; Add the following line to your ~/.emacs: | 66 | ;; Add the following line to your init file: |
| 67 | ;; (autoload 'uce-reply-to-uce "uce" "Reply to UCEs" t nil) | 67 | ;; (autoload 'uce-reply-to-uce "uce" "Reply to UCEs" t nil) |
| 68 | ;; If you want to use it with Gnus rather than Rmail: | 68 | ;; If you want to use it with Gnus rather than Rmail: |
| 69 | ;; (setq uce-mail-reader 'gnus) | 69 | ;; (setq uce-mail-reader 'gnus) |
diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el index 8d043b4495f..a8e32bec1ae 100644 --- a/lisp/mouse-copy.el +++ b/lisp/mouse-copy.el | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | ;; If you like mouse-copy, you should also check out mouse-drag | 35 | ;; If you like mouse-copy, you should also check out mouse-drag |
| 36 | ;; for ``one-click scrolling''. | 36 | ;; for ``one-click scrolling''. |
| 37 | ;; | 37 | ;; |
| 38 | ;; To use mouse-copy, place the following in your .emacs file: | 38 | ;; To use mouse-copy, place the following in your init file: |
| 39 | ;; (require 'mouse-copy) | 39 | ;; (require 'mouse-copy) |
| 40 | ;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting) | 40 | ;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting) |
| 41 | ;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving) | 41 | ;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving) |
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index 7fb10505355..acdad9a42cf 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | ;; If you like mouse-drag, you should also check out mouse-copy | 46 | ;; If you like mouse-drag, you should also check out mouse-copy |
| 47 | ;; for ``one-click text copy and move''. | 47 | ;; for ``one-click text copy and move''. |
| 48 | ;; | 48 | ;; |
| 49 | ;; To use mouse-drag, place the following in your .emacs file: | 49 | ;; To use mouse-drag, place the following in your init file: |
| 50 | ;; -either- | 50 | ;; -either- |
| 51 | ;; (global-set-key [down-mouse-2] 'mouse-drag-throw) | 51 | ;; (global-set-key [down-mouse-2] 'mouse-drag-throw) |
| 52 | ;; -or- | 52 | ;; -or- |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 1501fa41baa..265a855b842 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | ;; that this change will take effect for the current GNU Emacs session only. | 79 | ;; that this change will take effect for the current GNU Emacs session only. |
| 80 | ;; See below for a discussion of non-UNIX hosts. If a large number of | 80 | ;; See below for a discussion of non-UNIX hosts. If a large number of |
| 81 | ;; machines with similar hostnames have this problem then it is easier to set | 81 | ;; machines with similar hostnames have this problem then it is easier to set |
| 82 | ;; the value of ange-ftp-dumb-unix-host-regexp in your .emacs file. ange-ftp | 82 | ;; the value of ange-ftp-dumb-unix-host-regexp in your init file. ange-ftp |
| 83 | ;; is unable to automatically recognize dumb unix hosts. | 83 | ;; is unable to automatically recognize dumb unix hosts. |
| 84 | 84 | ||
| 85 | ;; File name completion: | 85 | ;; File name completion: |
| @@ -275,10 +275,10 @@ | |||
| 275 | 275 | ||
| 276 | ;; VMS support: | 276 | ;; VMS support: |
| 277 | ;; | 277 | ;; |
| 278 | ;; Ange-ftp has full support for VMS hosts. It | 278 | ;; Ange-ftp has full support for VMS hosts. It should be able to |
| 279 | ;; should be able to automatically recognize any VMS machine. However, if it | 279 | ;; automatically recognize any VMS machine. However, if it fails to do |
| 280 | ;; fails to do this, you can use the command ange-ftp-add-vms-host. As well, | 280 | ;; this, you can use the command ange-ftp-add-vms-host. Also, you can |
| 281 | ;; you can set the variable ange-ftp-vms-host-regexp in your .emacs file. We | 281 | ;; set the variable ange-ftp-vms-host-regexp in your init file. We |
| 282 | ;; would be grateful if you would report any failures to automatically | 282 | ;; would be grateful if you would report any failures to automatically |
| 283 | ;; recognize a VMS host as a bug. | 283 | ;; recognize a VMS host as a bug. |
| 284 | ;; | 284 | ;; |
| @@ -332,7 +332,7 @@ | |||
| 332 | ;; the Michigan terminal system. It should be able to automatically | 332 | ;; the Michigan terminal system. It should be able to automatically |
| 333 | ;; recognize any MTS machine. However, if it fails to do this, you can use | 333 | ;; recognize any MTS machine. However, if it fails to do this, you can use |
| 334 | ;; the command ange-ftp-add-mts-host. As well, you can set the variable | 334 | ;; the command ange-ftp-add-mts-host. As well, you can set the variable |
| 335 | ;; ange-ftp-mts-host-regexp in your .emacs file. We would be grateful if you | 335 | ;; ange-ftp-mts-host-regexp in your init file. We would be grateful if you |
| 336 | ;; would report any failures to automatically recognize a MTS host as a bug. | 336 | ;; would report any failures to automatically recognize a MTS host as a bug. |
| 337 | ;; | 337 | ;; |
| 338 | ;; Filename syntax: | 338 | ;; Filename syntax: |
| @@ -358,7 +358,7 @@ | |||
| 358 | ;; CMS. It should be able to automatically recognize any CMS machine. | 358 | ;; CMS. It should be able to automatically recognize any CMS machine. |
| 359 | ;; However, if it fails to do this, you can use the command | 359 | ;; However, if it fails to do this, you can use the command |
| 360 | ;; ange-ftp-add-cms-host. As well, you can set the variable | 360 | ;; ange-ftp-add-cms-host. As well, you can set the variable |
| 361 | ;; ange-ftp-cms-host-regexp in your .emacs file. We would be grateful if you | 361 | ;; ange-ftp-cms-host-regexp in your init file. We would be grateful if you |
| 362 | ;; would report any failures to automatically recognize a CMS host as a bug. | 362 | ;; would report any failures to automatically recognize a CMS host as a bug. |
| 363 | ;; | 363 | ;; |
| 364 | ;; Filename syntax: | 364 | ;; Filename syntax: |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 8daf339d376..b46d753d225 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -122,8 +122,7 @@ | |||
| 122 | ;; the buffer, use: | 122 | ;; the buffer, use: |
| 123 | ;; M-x browse-url | 123 | ;; M-x browse-url |
| 124 | 124 | ||
| 125 | ;; To display a URL by shift-clicking on it, put this in your ~/.emacs | 125 | ;; To display a URL by shift-clicking on it, put this in your init file: |
| 126 | ;; file: | ||
| 127 | ;; (global-set-key [S-mouse-2] 'browse-url-at-mouse) | 126 | ;; (global-set-key [S-mouse-2] 'browse-url-at-mouse) |
| 128 | ;; (Note that using Shift-mouse-1 is not desirable because | 127 | ;; (Note that using Shift-mouse-1 is not desirable because |
| 129 | ;; that event has a standard meaning in Emacs.) | 128 | ;; that event has a standard meaning in Emacs.) |
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 6a9d80f9672..f9e31788527 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | ;; INSTALLATION | 33 | ;; INSTALLATION |
| 34 | ;; | 34 | ;; |
| 35 | ;; To use goto-address in a particular mode (for example, while | 35 | ;; To use goto-address in a particular mode (for example, while |
| 36 | ;; reading mail in mh-e), add something like this in your .emacs file: | 36 | ;; reading mail in mh-e), add this to your init file: |
| 37 | ;; | 37 | ;; |
| 38 | ;; (add-hook 'mh-show-mode-hook 'goto-address) | 38 | ;; (add-hook 'mh-show-mode-hook 'goto-address) |
| 39 | ;; | 39 | ;; |
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el index 5d673faf0db..91eca84ce53 100644 --- a/lisp/net/newsticker.el +++ b/lisp/net/newsticker.el | |||
| @@ -87,7 +87,7 @@ | |||
| 87 | ;; If you are using Newsticker as part of GNU Emacs there is no need to | 87 | ;; If you are using Newsticker as part of GNU Emacs there is no need to |
| 88 | ;; perform any installation steps in order to use Newsticker. Otherwise | 88 | ;; perform any installation steps in order to use Newsticker. Otherwise |
| 89 | ;; place Newsticker in a directory where Emacs can find it. Add the | 89 | ;; place Newsticker in a directory where Emacs can find it. Add the |
| 90 | ;; following line to your Emacs startup file (`~/.emacs'). | 90 | ;; following line to your init file: |
| 91 | ;; (add-to-list 'load-path "/path/to/newsticker/") | 91 | ;; (add-to-list 'load-path "/path/to/newsticker/") |
| 92 | ;; (autoload 'newsticker-start "newsticker" "Emacs Newsticker" t) | 92 | ;; (autoload 'newsticker-start "newsticker" "Emacs Newsticker" t) |
| 93 | ;; (autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t) | 93 | ;; (autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t) |
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index f3b0e372de4..f7d41fcd97a 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el | |||
| @@ -164,7 +164,7 @@ To make use of this do something like: | |||
| 164 | 164 | ||
| 165 | (setq quickurl-postfix quickurl-reread-hook-postfix) | 165 | (setq quickurl-postfix quickurl-reread-hook-postfix) |
| 166 | 166 | ||
| 167 | in your ~/.emacs (after loading/requiring quickurl).") | 167 | in your init file (after loading/requiring quickurl).") |
| 168 | 168 | ||
| 169 | ;; Non-customize variables. | 169 | ;; Non-customize variables. |
| 170 | 170 | ||
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 06aae1f6af2..abca6b3ea01 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -204,7 +204,7 @@ useful thing to do is to put | |||
| 204 | 204 | ||
| 205 | (setq tramp-verbose 9) | 205 | (setq tramp-verbose 9) |
| 206 | 206 | ||
| 207 | in the ~/.emacs file and to repeat the bug. Then, include the | 207 | in your init file and to repeat the bug. Then, include the |
| 208 | contents of the *tramp/foo* buffer and the *debug tramp/foo* | 208 | contents of the *tramp/foo* buffer and the *debug tramp/foo* |
| 209 | buffer in your bug report. | 209 | buffer in your bug report. |
| 210 | 210 | ||
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index 232e5ca581a..d5de2f410c5 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | ;; example sites. You'll probably want to override it with your own favorite | 38 | ;; example sites. You'll probably want to override it with your own favorite |
| 39 | ;; sites. The documentation for the variable describes the syntax. | 39 | ;; sites. The documentation for the variable describes the syntax. |
| 40 | 40 | ||
| 41 | ;; You may wish to add something like the following to your `.emacs' file: | 41 | ;; You may wish to add something like the following to your init file: |
| 42 | ;; | 42 | ;; |
| 43 | ;; (require 'webjump) | 43 | ;; (require 'webjump) |
| 44 | ;; (global-set-key "\C-cj" 'webjump) | 44 | ;; (global-set-key "\C-cj" 'webjump) |
diff --git a/lisp/novice.el b/lisp/novice.el index bcc94c86c9d..c621ac4b692 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -159,8 +159,8 @@ to future sessions." | |||
| 159 | (defun disable-command (command) | 159 | (defun disable-command (command) |
| 160 | "Require special confirmation to execute COMMAND from now on. | 160 | "Require special confirmation to execute COMMAND from now on. |
| 161 | COMMAND must be a symbol. | 161 | COMMAND must be a symbol. |
| 162 | This command alters the user's .emacs file so that this will apply | 162 | This command alters your init file so that this choice applies to |
| 163 | to future sessions." | 163 | future sessions." |
| 164 | (interactive "CDisable command: ") | 164 | (interactive "CDisable command: ") |
| 165 | (en/disable-command command t)) | 165 | (en/disable-command command t)) |
| 166 | 166 | ||
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index d357da685e5..3f120961486 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;; argument position. | 28 | ;; argument position. |
| 29 | ;; | 29 | ;; |
| 30 | ;; To use pcomplete with shell-mode, for example, you will need the | 30 | ;; To use pcomplete with shell-mode, for example, you will need the |
| 31 | ;; following in your .emacs file: | 31 | ;; following in your init file: |
| 32 | ;; | 32 | ;; |
| 33 | ;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup) | 33 | ;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup) |
| 34 | ;; | 34 | ;; |
| @@ -451,9 +451,12 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 451 | (list beg (point) table | 451 | (list beg (point) table |
| 452 | :predicate pred | 452 | :predicate pred |
| 453 | :exit-function | 453 | :exit-function |
| 454 | ;; If completion is finished, add a terminating space. | ||
| 455 | ;; We used to also do this if STATUS is `sole', but | ||
| 456 | ;; that does not work right when completion cycling. | ||
| 454 | (unless (zerop (length pcomplete-termination-string)) | 457 | (unless (zerop (length pcomplete-termination-string)) |
| 455 | (lambda (_s finished) | 458 | (lambda (_s status) |
| 456 | (when (memq finished '(sole finished)) | 459 | (when (eq status 'finished) |
| 457 | (if (looking-at | 460 | (if (looking-at |
| 458 | (regexp-quote pcomplete-termination-string)) | 461 | (regexp-quote pcomplete-termination-string)) |
| 459 | (goto-char (match-end 0)) | 462 | (goto-char (match-end 0)) |
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 1f04099a6ae..3b6035473fd 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | ;; Installation | 33 | ;; Installation |
| 34 | ;; ------------ | 34 | ;; ------------ |
| 35 | 35 | ||
| 36 | ;; Add the following lines to your Emacs startup file (`~/.emacs'). | 36 | ;; Add the following lines to your init file: |
| 37 | ;; (add-to-list 'load-path "/path/to/bubbles/") | 37 | ;; (add-to-list 'load-path "/path/to/bubbles/") |
| 38 | ;; (autoload 'bubbles "bubbles" "Play Bubbles" t) | 38 | ;; (autoload 'bubbles "bubbles" "Play Bubbles" t) |
| 39 | 39 | ||
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index 8d9506a1614..ade0d15006a 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el | |||
| @@ -138,19 +138,7 @@ the tail of the list." | |||
| 138 | ("^)\\([A-Z ]+\\)\\([a-z ]+\\)" | 138 | ("^)\\([A-Z ]+\\)\\([a-z ]+\\)" |
| 139 | (1 font-lock-keyword-face) | 139 | (1 font-lock-keyword-face) |
| 140 | (2 font-lock-string-face))) | 140 | (2 font-lock-string-face))) |
| 141 | "Expressions to fontify in Decipher mode. | 141 | "Font Lock keywords for Decipher mode.") |
| 142 | |||
| 143 | Ciphertext uses `font-lock-keyword-face', plaintext uses | ||
| 144 | `font-lock-string-face', comments use `font-lock-comment-face', and | ||
| 145 | checkpoints use `font-lock-constant-face'. You can customize the | ||
| 146 | display by changing these variables. For best results, I recommend | ||
| 147 | that all faces use the same background color. | ||
| 148 | |||
| 149 | For example, to display ciphertext in the `bold' face, use | ||
| 150 | (add-hook 'decipher-mode-hook | ||
| 151 | (lambda () (set (make-local-variable 'font-lock-keyword-face) | ||
| 152 | 'bold))) | ||
| 153 | in your `.emacs' file.") | ||
| 154 | 142 | ||
| 155 | (defvar decipher-mode-map | 143 | (defvar decipher-mode-map |
| 156 | (let ((map (make-keymap))) | 144 | (let ((map (make-keymap))) |
diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el index d2e307c0145..85c128b08e2 100644 --- a/lisp/play/handwrite.el +++ b/lisp/play/handwrite.el | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | ;; Installation | 45 | ;; Installation |
| 46 | ;; | 46 | ;; |
| 47 | ;; type at your prompt "emacs -l handwrite.el" or put this file on your | 47 | ;; type at your prompt "emacs -l handwrite.el" or put this file on your |
| 48 | ;; Emacs-Lisp load path, add the following into your ~/.emacs startup file | 48 | ;; Emacs-Lisp load path, add the following into your init file: |
| 49 | ;; | 49 | ;; |
| 50 | ;; (require 'handwrite) | 50 | ;; (require 'handwrite) |
| 51 | ;; | 51 | ;; |
diff --git a/lisp/printing.el b/lisp/printing.el index 0152ed63dbb..02b2fb0139c 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -139,10 +139,9 @@ Please send all bug fixes and enhancements to | |||
| 139 | ;; | 139 | ;; |
| 140 | ;; One way to set variables is by calling `pr-customize', customize all | 140 | ;; One way to set variables is by calling `pr-customize', customize all |
| 141 | ;; variables and save the customization by future sessions (see Options | 141 | ;; variables and save the customization by future sessions (see Options |
| 142 | ;; section). Other way is by coding your settings on Emacs init file (that is, | 142 | ;; section). Other way is by adding code to your init file; see below |
| 143 | ;; ~/.emacs file), see below for a first setting template that it should be | 143 | ;; for a first setting template that it should be inserted on your |
| 144 | ;; inserted on your ~/.emacs file (or c:/_emacs, if you're using Windows 9x/NT | 144 | ;; init file: |
| 145 | ;; or MS-DOS): | ||
| 146 | ;; | 145 | ;; |
| 147 | ;; * Example of setting for Windows system: | 146 | ;; * Example of setting for Windows system: |
| 148 | ;; | 147 | ;; |
| @@ -297,8 +296,7 @@ Please send all bug fixes and enhancements to | |||
| 297 | ;; Using `printing' | 296 | ;; Using `printing' |
| 298 | ;; ---------------- | 297 | ;; ---------------- |
| 299 | ;; | 298 | ;; |
| 300 | ;; To use `printing' insert in your ~/.emacs file (or c:/_emacs, if you're | 299 | ;; To use `printing' insert in your init file: |
| 301 | ;; using Windows 9x/NT or MS-DOS): | ||
| 302 | ;; | 300 | ;; |
| 303 | ;; (require 'printing) | 301 | ;; (require 'printing) |
| 304 | ;; ;; ...some user settings... | 302 | ;; ;; ...some user settings... |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 4062646c967..5a054af9883 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | ;; This file requires Emacs-20.3, XEmacs-20.4 or higher and package cc-mode. | 69 | ;; This file requires Emacs-20.3, XEmacs-20.4 or higher and package cc-mode. |
| 70 | 70 | ||
| 71 | ;; If antlr-mode is not part of your distribution, put this file into your | 71 | ;; If antlr-mode is not part of your distribution, put this file into your |
| 72 | ;; load-path and the following into your ~/.emacs: | 72 | ;; load-path and the following into your init file: |
| 73 | ;; (autoload 'antlr-mode "antlr-mode" nil t) | 73 | ;; (autoload 'antlr-mode "antlr-mode" nil t) |
| 74 | ;; (setq auto-mode-alist (cons '("\\.g\\'" . antlr-mode) auto-mode-alist)) | 74 | ;; (setq auto-mode-alist (cons '("\\.g\\'" . antlr-mode) auto-mode-alist)) |
| 75 | ;; (add-hook 'speedbar-load-hook ; would be too late in antlr-mode.el | 75 | ;; (add-hook 'speedbar-load-hook ; would be too late in antlr-mode.el |
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 8bccb44f308..0dc596a472b 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el | |||
| @@ -1829,7 +1829,7 @@ itself is evaluated." | |||
| 1829 | (eval form)) | 1829 | (eval form)) |
| 1830 | 1830 | ||
| 1831 | ;; Only used at compile time - suppress "might not be defined at runtime". | 1831 | ;; Only used at compile time - suppress "might not be defined at runtime". |
| 1832 | (declare-function cl-macroexpand-all "cl-extra" (form &optional env)) | 1832 | (declare-function cl-macroexpand-all "cl" (form &optional env)) |
| 1833 | 1833 | ||
| 1834 | (defmacro c-lang-defconst (name &rest args) | 1834 | (defmacro c-lang-defconst (name &rest args) |
| 1835 | "Set the language specific values of the language constant NAME. | 1835 | "Set the language specific values of the language constant NAME. |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 78be8ac2cc4..d5a1be572ba 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -208,9 +208,10 @@ the evaluated constant value at compile time." | |||
| 208 | 208 | ||
| 209 | ;; Suppress "might not be defined at runtime" warning. | 209 | ;; Suppress "might not be defined at runtime" warning. |
| 210 | ;; This file is only used when compiling other cc files. | 210 | ;; This file is only used when compiling other cc files. |
| 211 | (declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys)) | 211 | ;; These are defined in cl as aliases to the cl- versions. |
| 212 | (declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest)) | 212 | (declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t) |
| 213 | (declare-function cl-macroexpand-all "cl-extra" (form &optional env)) | 213 | (declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t) |
| 214 | (declare-function cl-macroexpand-all "cl" (form &optional env)) | ||
| 214 | 215 | ||
| 215 | (eval-and-compile | 216 | (eval-and-compile |
| 216 | ;; Some helper functions used when building the language constants. | 217 | ;; Some helper functions used when building the language constants. |
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index cf628e44de0..20aa2bc2775 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el | |||
| @@ -352,8 +352,8 @@ might get set too. | |||
| 352 | If DONT-OVERRIDE is neither nil nor t, style variables whose default values | 352 | If DONT-OVERRIDE is neither nil nor t, style variables whose default values |
| 353 | have been set (more precisely, whose default values are not the symbol | 353 | have been set (more precisely, whose default values are not the symbol |
| 354 | `set-from-style') will not be changed. This avoids overriding global settings | 354 | `set-from-style') will not be changed. This avoids overriding global settings |
| 355 | done in ~/.emacs. It is useful to call c-set-style from a mode hook in this | 355 | done in your init file. It is useful to call c-set-style from a mode hook |
| 356 | way. | 356 | in this way. |
| 357 | 357 | ||
| 358 | If DONT-OVERRIDE is t, style variables that already have values (i.e., whose | 358 | If DONT-OVERRIDE is t, style variables that already have values (i.e., whose |
| 359 | values are not the symbol `set-from-style') will not be overridden. CC Mode | 359 | values are not the symbol `set-from-style') will not be overridden. CC Mode |
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 943b5c6a067..525b1c9671e 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | 49 | ||
| 50 | ;; INSTALLATION ====================================================== | 50 | ;; INSTALLATION ====================================================== |
| 51 | 51 | ||
| 52 | ;; Put the following in your ~/.emacs file. | 52 | ;; Put the following in your init file. |
| 53 | 53 | ||
| 54 | ;; If you want the *Macroexpansion* window to be not higher than | 54 | ;; If you want the *Macroexpansion* window to be not higher than |
| 55 | ;; necessary: | 55 | ;; necessary: |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index fbb0c9e204a..95b8758ba80 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -488,9 +488,12 @@ What matched the HYPERLINK'th subexpression has `mouse-face' and | |||
| 488 | `compilation-message-face' applied. If this is nil, the text | 488 | `compilation-message-face' applied. If this is nil, the text |
| 489 | matched by the whole REGEXP becomes the hyperlink. | 489 | matched by the whole REGEXP becomes the hyperlink. |
| 490 | 490 | ||
| 491 | Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is | 491 | Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where |
| 492 | the number of a submatch that should be highlighted when it matches, | 492 | SUBMATCH is the number of a submatch and FACE is an expression |
| 493 | and FACE is an expression returning the face to use for that submatch.." | 493 | which evaluates to a face name (a symbol or string). |
| 494 | Alternatively, FACE can evaluate to a property list of the | ||
| 495 | form (face FACE PROP1 VAL1 PROP2 VAL2 ...), in which case all the | ||
| 496 | listed text properties PROP# are given values VAL# as well." | ||
| 494 | :type '(repeat (choice (symbol :tag "Predefined symbol") | 497 | :type '(repeat (choice (symbol :tag "Predefined symbol") |
| 495 | (sexp :tag "Error specification"))) | 498 | (sexp :tag "Error specification"))) |
| 496 | :link `(file-link :tag "example file" | 499 | :link `(file-link :tag "example file" |
| @@ -1328,16 +1331,27 @@ to `compilation-error-regexp-alist' if RULES is nil." | |||
| 1328 | (compilation--put-prop | 1331 | (compilation--put-prop |
| 1329 | end-col 'font-lock-face compilation-column-face) | 1332 | end-col 'font-lock-face compilation-column-face) |
| 1330 | 1333 | ||
| 1334 | ;; Obey HIGHLIGHT. | ||
| 1331 | (dolist (extra-item (nthcdr 6 item)) | 1335 | (dolist (extra-item (nthcdr 6 item)) |
| 1332 | (let ((mn (pop extra-item))) | 1336 | (let ((mn (pop extra-item))) |
| 1333 | (when (match-beginning mn) | 1337 | (when (match-beginning mn) |
| 1334 | (let ((face (eval (car extra-item)))) | 1338 | (let ((face (eval (car extra-item)))) |
| 1335 | (cond | 1339 | (cond |
| 1336 | ((null face)) | 1340 | ((null face)) |
| 1337 | ((symbolp face) | 1341 | ((or (symbolp face) (stringp face)) |
| 1338 | (put-text-property | 1342 | (put-text-property |
| 1339 | (match-beginning mn) (match-end mn) | 1343 | (match-beginning mn) (match-end mn) |
| 1340 | 'font-lock-face face)) | 1344 | 'font-lock-face face)) |
| 1345 | ((and (listp face) | ||
| 1346 | (eq (car face) 'face) | ||
| 1347 | (or (symbolp (cadr face)) | ||
| 1348 | (stringp (cadr face)))) | ||
| 1349 | (put-text-property | ||
| 1350 | (match-beginning mn) (match-end mn) | ||
| 1351 | 'font-lock-face (cadr face)) | ||
| 1352 | (add-text-properties | ||
| 1353 | (match-beginning mn) (match-end mn) | ||
| 1354 | (nthcdr 2 face))) | ||
| 1341 | (t | 1355 | (t |
| 1342 | (error "Don't know how to handle face %S" | 1356 | (error "Don't know how to handle face %S" |
| 1343 | face))))))) | 1357 | face))))))) |
| @@ -1542,20 +1556,20 @@ Returns the compilation buffer created." | |||
| 1542 | (get-buffer-create | 1556 | (get-buffer-create |
| 1543 | (compilation-buffer-name name-of-mode mode name-function))) | 1557 | (compilation-buffer-name name-of-mode mode name-function))) |
| 1544 | (let ((comp-proc (get-buffer-process (current-buffer)))) | 1558 | (let ((comp-proc (get-buffer-process (current-buffer)))) |
| 1545 | (if comp-proc | 1559 | (if comp-proc |
| 1546 | (if (or (not (eq (process-status comp-proc) 'run)) | 1560 | (if (or (not (eq (process-status comp-proc) 'run)) |
| 1547 | compilation-always-kill | 1561 | (eq (process-query-on-exit-flag comp-proc) nil) |
| 1548 | (yes-or-no-p | 1562 | (yes-or-no-p |
| 1549 | (format "A %s process is running; kill it? " | 1563 | (format "A %s process is running; kill it? " |
| 1550 | name-of-mode))) | 1564 | name-of-mode))) |
| 1551 | (condition-case () | 1565 | (condition-case () |
| 1552 | (progn | 1566 | (progn |
| 1553 | (interrupt-process comp-proc) | 1567 | (interrupt-process comp-proc) |
| 1554 | (sit-for 1) | 1568 | (sit-for 1) |
| 1555 | (delete-process comp-proc)) | 1569 | (delete-process comp-proc)) |
| 1556 | (error nil)) | 1570 | (error nil)) |
| 1557 | (error "Cannot have two processes in `%s' at once" | 1571 | (error "Cannot have two processes in `%s' at once" |
| 1558 | (buffer-name))))) | 1572 | (buffer-name))))) |
| 1559 | ;; first transfer directory from where M-x compile was called | 1573 | ;; first transfer directory from where M-x compile was called |
| 1560 | (setq default-directory thisdir) | 1574 | (setq default-directory thisdir) |
| 1561 | ;; Make compilation buffer read-only. The filter can still write it. | 1575 | ;; Make compilation buffer read-only. The filter can still write it. |
| @@ -1610,7 +1624,7 @@ Returns the compilation buffer created." | |||
| 1610 | (let ((process-environment | 1624 | (let ((process-environment |
| 1611 | (append | 1625 | (append |
| 1612 | compilation-environment | 1626 | compilation-environment |
| 1613 | (if (if (boundp 'system-uses-terminfo) ; `if' for compiler warning | 1627 | (if (if (boundp 'system-uses-terminfo);`If' for compiler warning. |
| 1614 | system-uses-terminfo) | 1628 | system-uses-terminfo) |
| 1615 | (list "TERM=dumb" "TERMCAP=" | 1629 | (list "TERM=dumb" "TERMCAP=" |
| 1616 | (format "COLUMNS=%d" (window-width))) | 1630 | (format "COLUMNS=%d" (window-width))) |
| @@ -1660,13 +1674,20 @@ Returns the compilation buffer created." | |||
| 1660 | nil `("-c" ,command)))) | 1674 | nil `("-c" ,command)))) |
| 1661 | (start-file-process-shell-command (downcase mode-name) | 1675 | (start-file-process-shell-command (downcase mode-name) |
| 1662 | outbuf command)))) | 1676 | outbuf command)))) |
| 1663 | ;; Make the buffer's mode line show process state. | 1677 | ;; Make the buffer's mode line show process state. |
| 1664 | (setq mode-line-process | 1678 | (setq mode-line-process |
| 1665 | '(:propertize ":%s" face compilation-mode-line-run)) | 1679 | '(:propertize ":%s" face compilation-mode-line-run)) |
| 1666 | (set-process-sentinel proc 'compilation-sentinel) | 1680 | |
| 1667 | (unless (eq mode t) | 1681 | ;; Set the process as killable without query by default. |
| 1668 | ;; Keep the comint filter, since it's needed for proper handling | 1682 | ;; This allows us to start a new compilation without |
| 1669 | ;; of the prompts. | 1683 | ;; getting prompted. |
| 1684 | (when compilation-always-kill | ||
| 1685 | (set-process-query-on-exit-flag proc nil)) | ||
| 1686 | |||
| 1687 | (set-process-sentinel proc 'compilation-sentinel) | ||
| 1688 | (unless (eq mode t) | ||
| 1689 | ;; Keep the comint filter, since it's needed for proper | ||
| 1690 | ;; handling of the prompts. | ||
| 1670 | (set-process-filter proc 'compilation-filter)) | 1691 | (set-process-filter proc 'compilation-filter)) |
| 1671 | ;; Use (point-max) here so that output comes in | 1692 | ;; Use (point-max) here so that output comes in |
| 1672 | ;; after the initial text, | 1693 | ;; after the initial text, |
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index cdbaf4708a7..0f18cffc3de 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -43,7 +43,7 @@ Please send all bug fixes and enhancements to | |||
| 43 | ;; | 43 | ;; |
| 44 | ;; This package translates an EBNF to a syntactic chart on PostScript. | 44 | ;; This package translates an EBNF to a syntactic chart on PostScript. |
| 45 | ;; | 45 | ;; |
| 46 | ;; To use ebnf2ps, insert in your ~/.emacs: | 46 | ;; To use ebnf2ps, insert in your init file: |
| 47 | ;; | 47 | ;; |
| 48 | ;; (require 'ebnf2ps) | 48 | ;; (require 'ebnf2ps) |
| 49 | ;; | 49 | ;; |
| @@ -772,7 +772,7 @@ Please send all bug fixes and enhancements to | |||
| 772 | ;; | 772 | ;; |
| 773 | ;; To set the above options you may: | 773 | ;; To set the above options you may: |
| 774 | ;; | 774 | ;; |
| 775 | ;; a) insert the code in your ~/.emacs, like: | 775 | ;; a) insert the code in your init file, like: |
| 776 | ;; | 776 | ;; |
| 777 | ;; (setq ebnf-terminal-shape 'bevel) | 777 | ;; (setq ebnf-terminal-shape 'bevel) |
| 778 | ;; | 778 | ;; |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index cc1251f6a75..f42952685d0 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -102,10 +102,9 @@ | |||
| 102 | ;; (abbrev-mode 1) ; turn on abbreviation mode | 102 | ;; (abbrev-mode 1) ; turn on abbreviation mode |
| 103 | ;; (f90-add-imenu-menu) ; extra menu with functions etc. | 103 | ;; (f90-add-imenu-menu) ; extra menu with functions etc. |
| 104 | ;; (if f90-auto-keyword-case ; change case of all keywords on startup | 104 | ;; (if f90-auto-keyword-case ; change case of all keywords on startup |
| 105 | ;; (f90-change-keywords f90-auto-keyword-case)) | 105 | ;; (f90-change-keywords f90-auto-keyword-case)))) |
| 106 | ;; )) | ||
| 107 | ;; | 106 | ;; |
| 108 | ;; in your .emacs file. You can also customize the lists | 107 | ;; in your init file. You can also customize the lists |
| 109 | ;; f90-font-lock-keywords, etc. | 108 | ;; f90-font-lock-keywords, etc. |
| 110 | ;; | 109 | ;; |
| 111 | ;; The auto-fill and abbreviation minor modes are accessible from the F90 menu, | 110 | ;; The auto-fill and abbreviation minor modes are accessible from the F90 menu, |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 233b9a5212e..2a77ad013c7 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | ;; | 52 | ;; |
| 53 | ;; First make sure hideshow.el is in a directory in your `load-path'. | 53 | ;; First make sure hideshow.el is in a directory in your `load-path'. |
| 54 | ;; You can optionally byte-compile it using `M-x byte-compile-file'. | 54 | ;; You can optionally byte-compile it using `M-x byte-compile-file'. |
| 55 | ;; Then, add the following to your ~/.emacs: | 55 | ;; Then, add the following to your init file: |
| 56 | ;; | 56 | ;; |
| 57 | ;; (load-library "hideshow") | 57 | ;; (load-library "hideshow") |
| 58 | ;; (add-hook 'X-mode-hook ; other modes similarly | 58 | ;; (add-hook 'X-mode-hook ; other modes similarly |
diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el index 246ba8f29cd..24613d14634 100644 --- a/lisp/progmodes/idlw-complete-structtag.el +++ b/lisp/progmodes/idlw-complete-structtag.el | |||
| @@ -53,8 +53,8 @@ | |||
| 53 | ;; | 53 | ;; |
| 54 | ;; INSTALLATION | 54 | ;; INSTALLATION |
| 55 | ;; ============ | 55 | ;; ============ |
| 56 | ;; Put this file on the emacs load path and load it with the following | 56 | ;; Put this file on the emacs load path and load it with the following |
| 57 | ;; line in your .emacs file: | 57 | ;; line in your init file: |
| 58 | ;; | 58 | ;; |
| 59 | ;; (add-hook 'idlwave-load-hook | 59 | ;; (add-hook 'idlwave-load-hook |
| 60 | ;; (lambda () (require 'idlw-complete-structtag))) | 60 | ;; (lambda () (require 'idlw-complete-structtag))) |
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 4f9109284ae..08d1461c008 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | ;; | 48 | ;; |
| 49 | ;; Follow the instructions in the INSTALL file of the distribution. | 49 | ;; Follow the instructions in the INSTALL file of the distribution. |
| 50 | ;; In short, put this file on your load path and add the following | 50 | ;; In short, put this file on your load path and add the following |
| 51 | ;; lines to your .emacs file: | 51 | ;; lines to your init file: |
| 52 | ;; | 52 | ;; |
| 53 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) | 53 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
| 54 | ;; | 54 | ;; |
| @@ -111,9 +111,7 @@ For example, \"^\r?IDL> \" or \"^\r?WAVE> \". | |||
| 111 | The \"^\r?\" is needed, to indicate the beginning of the line, with | 111 | The \"^\r?\" is needed, to indicate the beginning of the line, with |
| 112 | optional return character (which IDL seems to output randomly). | 112 | optional return character (which IDL seems to output randomly). |
| 113 | This variable is used to initialize `comint-prompt-regexp' in the | 113 | This variable is used to initialize `comint-prompt-regexp' in the |
| 114 | process buffer. | 114 | process buffer." |
| 115 | |||
| 116 | This is a fine thing to set in your `.emacs' file." | ||
| 117 | :group 'idlwave-shell-general-setup | 115 | :group 'idlwave-shell-general-setup |
| 118 | :type 'regexp) | 116 | :type 'regexp) |
| 119 | 117 | ||
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index a35ffd3e45d..9b634328fa7 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | ;; | 51 | ;; |
| 52 | ;; Follow the instructions in the INSTALL file of the distribution. | 52 | ;; Follow the instructions in the INSTALL file of the distribution. |
| 53 | ;; In short, put this file on your load path and add the following | 53 | ;; In short, put this file on your load path and add the following |
| 54 | ;; lines to your .emacs file: | 54 | ;; lines to your init file: |
| 55 | ;; | 55 | ;; |
| 56 | ;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) | 56 | ;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) |
| 57 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) | 57 | ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
| @@ -746,7 +746,7 @@ or even '?'. '.' is not a good choice because it can make structure | |||
| 746 | field names act like abbrevs in certain circumstances. | 746 | field names act like abbrevs in certain circumstances. |
| 747 | 747 | ||
| 748 | Changes to this in `idlwave-mode-hook' will have no effect. Instead a user | 748 | Changes to this in `idlwave-mode-hook' will have no effect. Instead a user |
| 749 | must set it directly using `setq' in the .emacs file before idlwave.el | 749 | must set it directly using `setq' in the init file before idlwave.el |
| 750 | is loaded." | 750 | is loaded." |
| 751 | :group 'idlwave-abbrev-and-indent-action | 751 | :group 'idlwave-abbrev-and-indent-action |
| 752 | :type 'string) | 752 | :type 'string) |
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index cd6c8869d9f..401970b2ce8 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el | |||
| @@ -168,9 +168,7 @@ This variable is only used if the variable | |||
| 168 | More precise choices: | 168 | More precise choices: |
| 169 | Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" | 169 | Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" |
| 170 | franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" | 170 | franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" |
| 171 | kcl: \"^>+ *\" | 171 | kcl: \"^>+ *\"" |
| 172 | |||
| 173 | This is a fine thing to set in your .emacs file or through Custom." | ||
| 174 | :type 'regexp | 172 | :type 'regexp |
| 175 | :group 'inferior-lisp) | 173 | :group 'inferior-lisp) |
| 176 | 174 | ||
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index 54d857dd4b1..a59176a5aa6 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and | 32 | ;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and |
| 33 | ;; `ftp://ftp.gnu.org/pub/gnu/mdk'. | 33 | ;; `ftp://ftp.gnu.org/pub/gnu/mdk'. |
| 34 | ;; | 34 | ;; |
| 35 | ;; To use this mode, place the following in your .emacs file: | 35 | ;; To use this mode, place the following in your init file: |
| 36 | ;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. | 36 | ;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. |
| 37 | ;; When you load a file with the extension .mixal the mode will be started | 37 | ;; When you load a file with the extension .mixal the mode will be started |
| 38 | ;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. | 38 | ;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 79b3fcee720..ab5a19f8a2f 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -585,12 +585,12 @@ Variables you can use to customize Octave mode | |||
| 585 | Turning on Octave mode runs the hook `octave-mode-hook'. | 585 | Turning on Octave mode runs the hook `octave-mode-hook'. |
| 586 | 586 | ||
| 587 | To begin using this mode for all `.m' files that you edit, add the | 587 | To begin using this mode for all `.m' files that you edit, add the |
| 588 | following lines to your `.emacs' file: | 588 | following lines to your init file: |
| 589 | 589 | ||
| 590 | (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) | 590 | (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) |
| 591 | 591 | ||
| 592 | To automatically turn on the abbrev and auto-fill features, | 592 | To automatically turn on the abbrev and auto-fill features, |
| 593 | add the following lines to your `.emacs' file as well: | 593 | add the following lines to your init file as well: |
| 594 | 594 | ||
| 595 | (add-hook 'octave-mode-hook | 595 | (add-hook 'octave-mode-hook |
| 596 | (lambda () | 596 | (lambda () |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index e13b67e596d..3dd9a48bb33 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -28,14 +28,14 @@ | |||
| 28 | ;;; Commentary: | 28 | ;;; Commentary: |
| 29 | 29 | ||
| 30 | ;; To enter perl-mode automatically, add (autoload 'perl-mode "perl-mode") | 30 | ;; To enter perl-mode automatically, add (autoload 'perl-mode "perl-mode") |
| 31 | ;; to your .emacs file and change the first line of your perl script to: | 31 | ;; to your init file and change the first line of your perl script to: |
| 32 | ;; #!/usr/bin/perl -- # -*-Perl-*- | 32 | ;; #!/usr/bin/perl -- # -*-Perl-*- |
| 33 | ;; With arguments to perl: | 33 | ;; With arguments to perl: |
| 34 | ;; #!/usr/bin/perl -P- # -*-Perl-*- | 34 | ;; #!/usr/bin/perl -P- # -*-Perl-*- |
| 35 | ;; To handle files included with do 'filename.pl';, add something like | 35 | ;; To handle files included with do 'filename.pl';, add something like |
| 36 | ;; (setq auto-mode-alist (append (list (cons "\\.pl\\'" 'perl-mode)) | 36 | ;; (setq auto-mode-alist (append (list (cons "\\.pl\\'" 'perl-mode)) |
| 37 | ;; auto-mode-alist)) | 37 | ;; auto-mode-alist)) |
| 38 | ;; to your .emacs file; otherwise the .pl suffix defaults to prolog-mode. | 38 | ;; to your init file; otherwise the .pl suffix defaults to prolog-mode. |
| 39 | 39 | ||
| 40 | ;; This code is based on the 18.53 version c-mode.el, with extensive | 40 | ;; This code is based on the 18.53 version c-mode.el, with extensive |
| 41 | ;; rewriting. Most of the features of c-mode survived intact. | 41 | ;; rewriting. Most of the features of c-mode survived intact. |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 16d85cb2d79..33d43cb3d5a 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -60,9 +60,7 @@ | |||
| 60 | 60 | ||
| 61 | ;;; Installation: | 61 | ;;; Installation: |
| 62 | ;; | 62 | ;; |
| 63 | ;; Insert the following lines in your init file--typically ~/.emacs | 63 | ;; Insert the following lines in your init file: |
| 64 | ;; (GNU Emacs and XEmacs <21.4), or ~/.xemacs/init.el (XEmacs | ||
| 65 | ;; 21.4)--to use this mode when editing Prolog files under Emacs: | ||
| 66 | ;; | 64 | ;; |
| 67 | ;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) | 65 | ;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) |
| 68 | ;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) | 66 | ;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index f3ecbe3fc3d..3d5abc4df62 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -268,9 +268,8 @@ | |||
| 268 | 268 | ||
| 269 | (defcustom sql-password "" | 269 | (defcustom sql-password "" |
| 270 | "Default password. | 270 | "Default password. |
| 271 | 271 | If you customize this, the value will be stored in your init | |
| 272 | Storing your password in a textfile such as ~/.emacs could be dangerous. | 272 | file. Since that is a plaintext file, this could be dangerous." |
| 273 | Customizing your password will store it in your ~/.emacs file." | ||
| 274 | :type 'string | 273 | :type 'string |
| 275 | :group 'SQL | 274 | :group 'SQL |
| 276 | :risky t) | 275 | :risky t) |
| @@ -1285,8 +1284,8 @@ Based on `comint-mode-map'.") | |||
| 1285 | ["List all objects" sql-list-all (sql-get-product-feature sql-product :list-all)] | 1284 | ["List all objects" sql-list-all (sql-get-product-feature sql-product :list-all)] |
| 1286 | ["List table details" sql-list-table (sql-get-product-feature sql-product :list-table)])) | 1285 | ["List table details" sql-list-table (sql-get-product-feature sql-product :list-table)])) |
| 1287 | 1286 | ||
| 1288 | ;; Abbreviations -- if you want more of them, define them in your | 1287 | ;; Abbreviations -- if you want more of them, define them in your init |
| 1289 | ;; ~/.emacs file. Abbrevs have to be enabled in your ~/.emacs, too. | 1288 | ;; file. Abbrevs have to be enabled in your init file, too. |
| 1290 | 1289 | ||
| 1291 | (defvar sql-mode-abbrev-table nil | 1290 | (defvar sql-mode-abbrev-table nil |
| 1292 | "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") | 1291 | "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") |
| @@ -3715,8 +3714,8 @@ For information on how to create multiple SQLi buffers, see | |||
| 3715 | `sql-interactive-mode'. | 3714 | `sql-interactive-mode'. |
| 3716 | 3715 | ||
| 3717 | Note that SQL doesn't have an escape character unless you specify | 3716 | Note that SQL doesn't have an escape character unless you specify |
| 3718 | one. If you specify backslash as escape character in SQL, | 3717 | one. If you specify backslash as escape character in SQL, you |
| 3719 | you must tell Emacs. Here's how to do that in your `~/.emacs' file: | 3718 | must tell Emacs. Here's how to do that in your init file: |
| 3720 | 3719 | ||
| 3721 | \(add-hook 'sql-mode-hook | 3720 | \(add-hook 'sql-mode-hook |
| 3722 | (lambda () | 3721 | (lambda () |
| @@ -3806,7 +3805,7 @@ cause the window to scroll to the end of the buffer. | |||
| 3806 | If you want to make SQL buffers limited in length, add the function | 3805 | If you want to make SQL buffers limited in length, add the function |
| 3807 | `comint-truncate-buffer' to `comint-output-filter-functions'. | 3806 | `comint-truncate-buffer' to `comint-output-filter-functions'. |
| 3808 | 3807 | ||
| 3809 | Here is an example for your .emacs file. It keeps the SQLi buffer a | 3808 | Here is an example for your init file. It keeps the SQLi buffer a |
| 3810 | certain length. | 3809 | certain length. |
| 3811 | 3810 | ||
| 3812 | \(add-hook 'sql-interactive-mode-hook | 3811 | \(add-hook 'sql-interactive-mode-hook |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index c072754e66d..835d548c19f 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -8790,7 +8790,7 @@ Note these are only read when the file is first visited, you must use | |||
| 8790 | \\[find-alternate-file] RET to have these take effect after editing them! | 8790 | \\[find-alternate-file] RET to have these take effect after editing them! |
| 8791 | 8791 | ||
| 8792 | If you want to disable the \"Process `eval' or hook local variables\" | 8792 | If you want to disable the \"Process `eval' or hook local variables\" |
| 8793 | warning message, you need to add to your .emacs file: | 8793 | warning message, you need to add to your init file: |
| 8794 | 8794 | ||
| 8795 | (setq enable-local-eval t)" | 8795 | (setq enable-local-eval t)" |
| 8796 | (let ((origbuf (current-buffer))) | 8796 | (let ((origbuf (current-buffer))) |
| @@ -11756,7 +11756,7 @@ An example: | |||
| 11756 | 11756 | ||
| 11757 | // For this example we declare the function in the | 11757 | // For this example we declare the function in the |
| 11758 | // module's file itself. Often you'd define it instead | 11758 | // module's file itself. Often you'd define it instead |
| 11759 | // in a site-start.el or .emacs file. | 11759 | // in a site-start.el or init file. |
| 11760 | /* | 11760 | /* |
| 11761 | Local Variables: | 11761 | Local Variables: |
| 11762 | eval: | 11762 | eval: |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index addf2975c5f..930e750ab27 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -1042,7 +1042,7 @@ Please send all bug fixes and enhancements to | |||
| 1042 | ;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'. | 1042 | ;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'. |
| 1043 | ;; These variables contain lists of faces that ps-print should consider bold, | 1043 | ;; These variables contain lists of faces that ps-print should consider bold, |
| 1044 | ;; italic or underline; to set them, put code like the following into your | 1044 | ;; italic or underline; to set them, put code like the following into your |
| 1045 | ;; .emacs file: | 1045 | ;; init file: |
| 1046 | ;; | 1046 | ;; |
| 1047 | ;; (setq ps-bold-faces '(my-blue-face)) | 1047 | ;; (setq ps-bold-faces '(my-blue-face)) |
| 1048 | ;; (setq ps-italic-faces '(my-red-face)) | 1048 | ;; (setq ps-italic-faces '(my-red-face)) |
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 43dad63a140..0c082169462 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -56,13 +56,12 @@ This means when you visit a file, point goes to the last place | |||
| 56 | where it was when you previously visited the same file. | 56 | where it was when you previously visited the same file. |
| 57 | This variable is automatically buffer-local. | 57 | This variable is automatically buffer-local. |
| 58 | 58 | ||
| 59 | If you wish your place in any file to always be automatically saved, | 59 | If you wish your place in any file to always be automatically |
| 60 | simply put this in your `~/.emacs' file: | 60 | saved, set this to t using the Customize facility, or put the |
| 61 | following code in your init file: | ||
| 61 | 62 | ||
| 62 | \(setq-default save-place t) | 63 | \(setq-default save-place t) |
| 63 | \(require 'saveplace) | 64 | \(require 'saveplace)" |
| 64 | |||
| 65 | or else use the Custom facility to set this option." | ||
| 66 | :type 'boolean | 65 | :type 'boolean |
| 67 | :require 'saveplace | 66 | :require 'saveplace |
| 68 | :group 'save-place) | 67 | :group 'save-place) |
| @@ -148,7 +147,8 @@ even in a later Emacs session. | |||
| 148 | If called with a prefix arg, the mode is enabled if and only if | 147 | If called with a prefix arg, the mode is enabled if and only if |
| 149 | the argument is positive. | 148 | the argument is positive. |
| 150 | 149 | ||
| 151 | To save places automatically in all files, put this in your `.emacs' file: | 150 | To save places automatically in all files, put this in your init |
| 151 | file: | ||
| 152 | 152 | ||
| 153 | \(setq-default save-place t\)" | 153 | \(setq-default save-place t\)" |
| 154 | (interactive "P") | 154 | (interactive "P") |
diff --git a/lisp/shell.el b/lisp/shell.el index b98efceefbf..77a42389785 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | ;; YOUR .EMACS FILE | 47 | ;; YOUR .EMACS FILE |
| 48 | ;;============================================================================= | 48 | ;;============================================================================= |
| 49 | ;; Some suggestions for your .emacs file. | 49 | ;; Some suggestions for your init file. |
| 50 | ;; | 50 | ;; |
| 51 | ;; ;; Define M-# to run some strange command: | 51 | ;; ;; Define M-# to run some strange command: |
| 52 | ;; (eval-after-load "shell" | 52 | ;; (eval-after-load "shell" |
| @@ -136,9 +136,7 @@ how Shell mode treats paragraphs. | |||
| 136 | 136 | ||
| 137 | The pattern should probably not match more than one line. If it does, | 137 | The pattern should probably not match more than one line. If it does, |
| 138 | Shell mode may become confused trying to distinguish prompt from input | 138 | Shell mode may become confused trying to distinguish prompt from input |
| 139 | on lines which don't start with a prompt. | 139 | on lines which don't start with a prompt." |
| 140 | |||
| 141 | This is a fine thing to set in your `.emacs' file." | ||
| 142 | :type 'regexp | 140 | :type 'regexp |
| 143 | :group 'shell) | 141 | :group 'shell) |
| 144 | 142 | ||
| @@ -146,9 +144,7 @@ This is a fine thing to set in your `.emacs' file." | |||
| 146 | "List of suffixes to be disregarded during file/command completion. | 144 | "List of suffixes to be disregarded during file/command completion. |
| 147 | This variable is used to initialize `comint-completion-fignore' in the shell | 145 | This variable is used to initialize `comint-completion-fignore' in the shell |
| 148 | buffer. The default is nil, for compatibility with most shells. | 146 | buffer. The default is nil, for compatibility with most shells. |
| 149 | Some people like (\"~\" \"#\" \"%\"). | 147 | Some people like (\"~\" \"#\" \"%\")." |
| 150 | |||
| 151 | This is a fine thing to set in your `.emacs' file." | ||
| 152 | :type '(repeat (string :tag "Suffix")) | 148 | :type '(repeat (string :tag "Suffix")) |
| 153 | :group 'shell) | 149 | :group 'shell) |
| 154 | 150 | ||
| @@ -158,31 +154,29 @@ This variable is used to initialize `comint-delimiter-argument-list' in the | |||
| 158 | shell buffer. The value may depend on the operating system or shell." | 154 | shell buffer. The value may depend on the operating system or shell." |
| 159 | :type '(choice (const nil) | 155 | :type '(choice (const nil) |
| 160 | (repeat :tag "List of characters" character)) | 156 | (repeat :tag "List of characters" character)) |
| 161 | ;; Reverted. | ||
| 162 | ;; :version "24.1" ; changed to nil (bug#8027) | ||
| 163 | :group 'shell) | 157 | :group 'shell) |
| 164 | 158 | ||
| 165 | (defvar shell-file-name-chars | 159 | (defcustom shell-file-name-chars |
| 166 | (if (memq system-type '(ms-dos windows-nt cygwin)) | 160 | (if (memq system-type '(ms-dos windows-nt cygwin)) |
| 167 | "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" | 161 | "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" |
| 168 | "[]~/A-Za-z0-9+@:_.$#%,={}-") | 162 | "[]~/A-Za-z0-9+@:_.$#%,={}-") |
| 169 | "String of characters valid in a file name. | 163 | "String of characters valid in a file name. |
| 170 | This variable is used to initialize `comint-file-name-chars' in the | 164 | This variable is used to initialize `comint-file-name-chars' in the |
| 171 | shell buffer. The value may depend on the operating system or shell. | 165 | shell buffer. The value may depend on the operating system or shell." |
| 172 | 166 | :type 'string | |
| 173 | This is a fine thing to set in your `.emacs' file.") | 167 | :group 'shell) |
| 174 | 168 | ||
| 175 | (defvar shell-file-name-quote-list | 169 | (defcustom shell-file-name-quote-list |
| 176 | (if (memq system-type '(ms-dos windows-nt)) | 170 | (if (memq system-type '(ms-dos windows-nt)) |
| 177 | nil | 171 | nil |
| 178 | (append shell-delimiter-argument-list '(?\s ?$ ?\* ?\! ?\" ?\' ?\` ?\# ?\\))) | 172 | (append shell-delimiter-argument-list '(?\s ?$ ?\* ?\! ?\" ?\' ?\` ?\# ?\\))) |
| 179 | "List of characters to quote when in a file name. | 173 | "List of characters to quote when in a file name. |
| 180 | This variable is used to initialize `comint-file-name-quote-list' in the | 174 | This variable is used to initialize `comint-file-name-quote-list' in the |
| 181 | shell buffer. The value may depend on the operating system or shell. | 175 | shell buffer. The value may depend on the operating system or shell." |
| 182 | 176 | :type '(repeat character) | |
| 183 | This is a fine thing to set in your `.emacs' file.") | 177 | :group 'shell) |
| 184 | 178 | ||
| 185 | (defvar shell-dynamic-complete-functions | 179 | (defcustom shell-dynamic-complete-functions |
| 186 | '(comint-c-a-p-replace-by-expanded-history | 180 | '(comint-c-a-p-replace-by-expanded-history |
| 187 | shell-environment-variable-completion | 181 | shell-environment-variable-completion |
| 188 | shell-command-completion | 182 | shell-command-completion |
| @@ -192,9 +186,9 @@ This is a fine thing to set in your `.emacs' file.") | |||
| 192 | comint-filename-completion) | 186 | comint-filename-completion) |
| 193 | "List of functions called to perform completion. | 187 | "List of functions called to perform completion. |
| 194 | This variable is used to initialize `comint-dynamic-complete-functions' in the | 188 | This variable is used to initialize `comint-dynamic-complete-functions' in the |
| 195 | shell buffer. | 189 | shell buffer." |
| 196 | 190 | :type '(repeat function) | |
| 197 | This is a fine thing to set in your `.emacs' file.") | 191 | :group 'shell) |
| 198 | 192 | ||
| 199 | (defcustom shell-command-regexp "[^;&|\n]+" | 193 | (defcustom shell-command-regexp "[^;&|\n]+" |
| 200 | "Regexp to match a single command within a pipeline. | 194 | "Regexp to match a single command within a pipeline. |
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 90cdea63e85..25a6fbfd998 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -706,7 +706,7 @@ will be stripped by a simplified optimizer when compiled into a | |||
| 706 | singular expression. This variable will be turned into | 706 | singular expression. This variable will be turned into |
| 707 | `speedbar-file-regexp' for use with speedbar. You should use the | 707 | `speedbar-file-regexp' for use with speedbar. You should use the |
| 708 | function `speedbar-add-supported-extension' to add a new extension at | 708 | function `speedbar-add-supported-extension' to add a new extension at |
| 709 | runtime, or use the configuration dialog to set it in your .emacs file. | 709 | runtime, or use the configuration dialog to set it in your init file. |
| 710 | If you add an extension to this list, and it does not appear, you may | 710 | If you add an extension to this list, and it does not appear, you may |
| 711 | need to also modify `completion-ignored-extension' which will also help | 711 | need to also modify `completion-ignored-extension' which will also help |
| 712 | file completion." | 712 | file completion." |
diff --git a/lisp/startup.el b/lisp/startup.el index 348e653dd28..db5efb89eed 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -71,12 +71,13 @@ once you are familiar with the contents of the startup screen." | |||
| 71 | "Non-nil inhibits the initial startup echo area message. | 71 | "Non-nil inhibits the initial startup echo area message. |
| 72 | Setting this variable takes effect | 72 | Setting this variable takes effect |
| 73 | only if you do it with the customization buffer | 73 | only if you do it with the customization buffer |
| 74 | or if your `.emacs' file contains a line of this form: | 74 | or if your init file contains a line of this form: |
| 75 | (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") | 75 | (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") |
| 76 | If your `.emacs' file is byte-compiled, use the following form instead: | 76 | If your init file is byte-compiled, use the following form |
| 77 | instead: | ||
| 77 | (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) | 78 | (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) |
| 78 | Thus, someone else using a copy of your `.emacs' file will see | 79 | Thus, someone else using a copy of your init file will see the |
| 79 | the startup message unless he personally acts to inhibit it." | 80 | startup message unless he personally acts to inhibit it." |
| 80 | :type '(choice (const :tag "Don't inhibit") | 81 | :type '(choice (const :tag "Don't inhibit") |
| 81 | (string :tag "Enter your user name, to inhibit")) | 82 | (string :tag "Enter your user name, to inhibit")) |
| 82 | :group 'initialization) | 83 | :group 'initialization) |
| @@ -261,10 +262,14 @@ and VALUE is the value which is given to that frame parameter | |||
| 261 | "Normal hook run after handling urgent options but before loading init files.") | 262 | "Normal hook run after handling urgent options but before loading init files.") |
| 262 | 263 | ||
| 263 | (defvar after-init-hook nil | 264 | (defvar after-init-hook nil |
| 264 | "Normal hook run after loading the init files, `~/.emacs' and `default.el'. | 265 | "Normal hook run after initializing the Emacs session. |
| 265 | There is no `condition-case' around the running of these functions; | 266 | It is run after Emacs loads the init file, `default' library, the |
| 266 | therefore, if you set `debug-on-error' non-nil in `.emacs', | 267 | abbrevs file, and additional Lisp packages (if any), and setting |
| 267 | an error in one of these functions will invoke the debugger.") | 268 | the value of `after-init-time'. |
| 269 | |||
| 270 | There is no `condition-case' around the running of this hook; | ||
| 271 | therefore, if `debug-on-error' is non-nil, an error in one of | ||
| 272 | these functions will invoke the debugger.") | ||
| 268 | 273 | ||
| 269 | (defvar emacs-startup-hook nil | 274 | (defvar emacs-startup-hook nil |
| 270 | "Normal hook run after loading init files and handling the command line.") | 275 | "Normal hook run after loading init files and handling the command line.") |
| @@ -296,7 +301,7 @@ the user's init file.") | |||
| 296 | :group 'initialization) | 301 | :group 'initialization) |
| 297 | 302 | ||
| 298 | (defvar init-file-user nil | 303 | (defvar init-file-user nil |
| 299 | "Identity of user whose `.emacs' file is or was read. | 304 | "Identity of user whose init file is or was read. |
| 300 | The value is nil if `-q' or `--no-init-file' was specified, | 305 | The value is nil if `-q' or `--no-init-file' was specified, |
| 301 | meaning do not load any init file. | 306 | meaning do not load any init file. |
| 302 | 307 | ||
| @@ -306,7 +311,7 @@ or it may be a string containing a user's name meaning | |||
| 306 | use that person's init file. | 311 | use that person's init file. |
| 307 | 312 | ||
| 308 | In either of the latter cases, `(concat \"~\" init-file-user \"/\")' | 313 | In either of the latter cases, `(concat \"~\" init-file-user \"/\")' |
| 309 | evaluates to the name of the directory where the `.emacs' file was | 314 | evaluates to the name of the directory where the init file was |
| 310 | looked for. | 315 | looked for. |
| 311 | 316 | ||
| 312 | Setting `init-file-user' does not prevent Emacs from loading | 317 | Setting `init-file-user' does not prevent Emacs from loading |
| @@ -365,7 +370,7 @@ init file is read, in case it sets `mail-host-address'." | |||
| 365 | (t | 370 | (t |
| 366 | (concat user-emacs-directory "auto-save-list/.saves-"))) | 371 | (concat user-emacs-directory "auto-save-list/.saves-"))) |
| 367 | "Prefix for generating `auto-save-list-file-name'. | 372 | "Prefix for generating `auto-save-list-file-name'. |
| 368 | This is used after reading your `.emacs' file to initialize | 373 | This is used after reading your init file to initialize |
| 369 | `auto-save-list-file-name', by appending Emacs's pid and the system name, | 374 | `auto-save-list-file-name', by appending Emacs's pid and the system name, |
| 370 | if you have not already set `auto-save-list-file-name' yourself. | 375 | if you have not already set `auto-save-list-file-name' yourself. |
| 371 | Directories in the prefix will be created if necessary. | 376 | Directories in the prefix will be created if necessary. |
diff --git a/lisp/strokes.el b/lisp/strokes.el index dfd0e95f61a..62a8528f25d 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el | |||
| @@ -933,14 +933,7 @@ and then safely save them for later use, send letters to friends | |||
| 933 | extracting the strokes for editing use once again, so the editing | 933 | extracting the strokes for editing use once again, so the editing |
| 934 | cycle can continue. | 934 | cycle can continue. |
| 935 | 935 | ||
| 936 | Strokes are easy to program and fun to use. To start strokes going, | 936 | To toggle strokes-mode, invoke the command |
| 937 | you'll want to put the following line in your .emacs file as mentioned | ||
| 938 | in the commentary to strokes.el. | ||
| 939 | |||
| 940 | This will load strokes when and only when you start Emacs on a window | ||
| 941 | system, with a mouse or other pointer device defined. | ||
| 942 | |||
| 943 | To toggle strokes-mode, you just do | ||
| 944 | 937 | ||
| 945 | > M-x strokes-mode | 938 | > M-x strokes-mode |
| 946 | 939 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index aa1b10ce17d..e9b85ff1f38 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -80,6 +80,7 @@ For more information, see Info node `(elisp)Declaring Functions'." | |||
| 80 | (defmacro noreturn (form) | 80 | (defmacro noreturn (form) |
| 81 | "Evaluate FORM, expecting it not to return. | 81 | "Evaluate FORM, expecting it not to return. |
| 82 | If FORM does return, signal an error." | 82 | If FORM does return, signal an error." |
| 83 | (declare (debug t)) | ||
| 83 | `(prog1 ,form | 84 | `(prog1 ,form |
| 84 | (error "Form marked with `noreturn' did return"))) | 85 | (error "Form marked with `noreturn' did return"))) |
| 85 | 86 | ||
| @@ -87,6 +88,7 @@ If FORM does return, signal an error." | |||
| 87 | "Evaluate FORM, expecting a constant return value. | 88 | "Evaluate FORM, expecting a constant return value. |
| 88 | This is the global do-nothing version. There is also `testcover-1value' | 89 | This is the global do-nothing version. There is also `testcover-1value' |
| 89 | that complains if FORM ever does return differing values." | 90 | that complains if FORM ever does return differing values." |
| 91 | (declare (debug t)) | ||
| 90 | form) | 92 | form) |
| 91 | 93 | ||
| 92 | (defmacro def-edebug-spec (symbol spec) | 94 | (defmacro def-edebug-spec (symbol spec) |
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index 9a9a31f4253..aea2e8c1092 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el | |||
| @@ -322,7 +322,7 @@ | |||
| 322 | "Terminal initialization function for iris-ansi." | 322 | "Terminal initialization function for iris-ansi." |
| 323 | ;; Use inheritance to let the main keymap override these defaults. | 323 | ;; Use inheritance to let the main keymap override these defaults. |
| 324 | ;; This way we don't override terminfo-derived settings or settings | 324 | ;; This way we don't override terminfo-derived settings or settings |
| 325 | ;; made in the .emacs file. | 325 | ;; made in the init file. |
| 326 | (let ((m (copy-keymap iris-function-map))) | 326 | (let ((m (copy-keymap iris-function-map))) |
| 327 | (set-keymap-parent m (keymap-parent input-decode-map)) | 327 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 328 | (set-keymap-parent input-decode-map m))) | 328 | (set-keymap-parent input-decode-map m))) |
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 76a3a31cedc..6b9e1301003 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el | |||
| @@ -75,7 +75,7 @@ | |||
| 75 | (defun terminal-init-lk201 () | 75 | (defun terminal-init-lk201 () |
| 76 | ;; Use inheritance to let the main keymap override these defaults. | 76 | ;; Use inheritance to let the main keymap override these defaults. |
| 77 | ;; This way we don't override terminfo-derived settings or settings | 77 | ;; This way we don't override terminfo-derived settings or settings |
| 78 | ;; made in the .emacs file. | 78 | ;; made in the init file. |
| 79 | (let ((m (copy-keymap lk201-function-map))) | 79 | (let ((m (copy-keymap lk201-function-map))) |
| 80 | (set-keymap-parent m (keymap-parent input-decode-map)) | 80 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 81 | (set-keymap-parent input-decode-map m))) | 81 | (set-keymap-parent input-decode-map m))) |
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 481d6b498cf..98141563006 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el | |||
| @@ -166,7 +166,7 @@ | |||
| 166 | 166 | ||
| 167 | ;; Use inheritance to let the main keymap override those defaults. | 167 | ;; Use inheritance to let the main keymap override those defaults. |
| 168 | ;; This way we don't override terminfo-derived settings or settings | 168 | ;; This way we don't override terminfo-derived settings or settings |
| 169 | ;; made in the .emacs file. | 169 | ;; made in the init file. |
| 170 | (let ((m (copy-keymap rxvt-function-map))) | 170 | (let ((m (copy-keymap rxvt-function-map))) |
| 171 | (set-keymap-parent m (keymap-parent input-decode-map)) | 171 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 172 | (set-keymap-parent input-decode-map m)) | 172 | (set-keymap-parent input-decode-map m)) |
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index b02d39c1e0f..f1b6eea8875 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el | |||
| @@ -93,7 +93,7 @@ | |||
| 93 | "Terminal initialization function for tvi970." | 93 | "Terminal initialization function for tvi970." |
| 94 | ;; Use inheritance to let the main keymap override these defaults. | 94 | ;; Use inheritance to let the main keymap override these defaults. |
| 95 | ;; This way we don't override terminfo-derived settings or settings | 95 | ;; This way we don't override terminfo-derived settings or settings |
| 96 | ;; made in the .emacs file. | 96 | ;; made in the init file. |
| 97 | (let ((m (copy-keymap tvi970-terminal-map))) | 97 | (let ((m (copy-keymap tvi970-terminal-map))) |
| 98 | (set-keymap-parent m (keymap-parent input-decode-map)) | 98 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 99 | (set-keymap-parent input-decode-map m)) | 99 | (set-keymap-parent input-decode-map m)) |
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index d037962af19..ce148b62dba 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el | |||
| @@ -109,7 +109,7 @@ | |||
| 109 | "Terminal initialization function for wyse50." | 109 | "Terminal initialization function for wyse50." |
| 110 | ;; Use inheritance to let the main keymap override these defaults. | 110 | ;; Use inheritance to let the main keymap override these defaults. |
| 111 | ;; This way we don't override terminfo-derived settings or settings | 111 | ;; This way we don't override terminfo-derived settings or settings |
| 112 | ;; made in the .emacs file. | 112 | ;; made in the init file. |
| 113 | (let ((m (copy-keymap wyse50-terminal-map))) | 113 | (let ((m (copy-keymap wyse50-terminal-map))) |
| 114 | (set-keymap-parent m (keymap-parent input-decode-map)) | 114 | (set-keymap-parent m (keymap-parent input-decode-map)) |
| 115 | (set-keymap-parent input-decode-map m)) | 115 | (set-keymap-parent input-decode-map m)) |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 28fb9da0b9d..e4871658b98 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -480,7 +480,7 @@ The relevant features are: | |||
| 480 | 480 | ||
| 481 | ;; Use inheritance to let the main keymap override those defaults. | 481 | ;; Use inheritance to let the main keymap override those defaults. |
| 482 | ;; This way we don't override terminfo-derived settings or settings | 482 | ;; This way we don't override terminfo-derived settings or settings |
| 483 | ;; made in the .emacs file. | 483 | ;; made in the init file. |
| 484 | (set-keymap-parent map (keymap-parent input-decode-map)) | 484 | (set-keymap-parent map (keymap-parent input-decode-map)) |
| 485 | (set-keymap-parent input-decode-map map))) | 485 | (set-keymap-parent input-decode-map map))) |
| 486 | 486 | ||
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index a9320d945ef..42f0418b690 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -290,9 +290,9 @@ If this variable is nil, all regions are treated as small." | |||
| 290 | ;;* Mode specific options enable users to disable flyspell on */ | 290 | ;;* Mode specific options enable users to disable flyspell on */ |
| 291 | ;;* certain word depending of the emacs mode. For instance, when */ | 291 | ;;* certain word depending of the emacs mode. For instance, when */ |
| 292 | ;;* using flyspell with mail-mode add the following expression */ | 292 | ;;* using flyspell with mail-mode add the following expression */ |
| 293 | ;;* in your .emacs file: */ | 293 | ;;* in your init file: */ |
| 294 | ;;* (add-hook 'mail-mode */ | 294 | ;;* (add-hook 'mail-mode */ |
| 295 | ;;* (lambda () (setq flyspell-generic-check-word-predicate */ | 295 | ;;* (lambda () (setq flyspell-generic-check-word-predicate */ |
| 296 | ;;* 'mail-mode-flyspell-verify))) */ | 296 | ;;* 'mail-mode-flyspell-verify))) */ |
| 297 | ;;*---------------------------------------------------------------------*/ | 297 | ;;*---------------------------------------------------------------------*/ |
| 298 | (defvar flyspell-generic-check-word-predicate nil | 298 | (defvar flyspell-generic-check-word-predicate nil |
| @@ -488,7 +488,7 @@ invoking `ispell-change-dictionary'. | |||
| 488 | Consider using the `ispell-parser' to check your text. For instance | 488 | Consider using the `ispell-parser' to check your text. For instance |
| 489 | consider adding: | 489 | consider adding: |
| 490 | \(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) | 490 | \(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) |
| 491 | in your .emacs file. | 491 | in your init file. |
| 492 | 492 | ||
| 493 | \\[flyspell-region] checks all words inside a region. | 493 | \\[flyspell-region] checks all words inside a region. |
| 494 | \\[flyspell-buffer] checks the whole buffer." | 494 | \\[flyspell-buffer] checks the whole buffer." |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0c7966f22d3..51a4800de52 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1127,7 +1127,8 @@ aspell is used along with Emacs).") | |||
| 1127 | 1127 | ||
| 1128 | ;; If Emacs flavor supports [:alpha:] use it for global dicts. If | 1128 | ;; If Emacs flavor supports [:alpha:] use it for global dicts. If |
| 1129 | ;; spellchecker also supports UTF-8 via command-line option use it | 1129 | ;; spellchecker also supports UTF-8 via command-line option use it |
| 1130 | ;; in communication. This does not affect definitions in ~/.emacs. | 1130 | ;; in communication. This does not affect definitions in your |
| 1131 | ;; init file. | ||
| 1131 | (if ispell-emacs-alpha-regexp | 1132 | (if ispell-emacs-alpha-regexp |
| 1132 | (let (tmp-dicts-alist) | 1133 | (let (tmp-dicts-alist) |
| 1133 | (dolist (adict ispell-dictionary-alist) | 1134 | (dolist (adict ispell-dictionary-alist) |
| @@ -3680,7 +3681,7 @@ use the `x' command. (Any subsequent regions will be checked.) | |||
| 3680 | The `X' command aborts sending the message so that you can edit the buffer. | 3681 | The `X' command aborts sending the message so that you can edit the buffer. |
| 3681 | 3682 | ||
| 3682 | To spell-check whenever a message is sent, include the appropriate lines | 3683 | To spell-check whenever a message is sent, include the appropriate lines |
| 3683 | in your .emacs file: | 3684 | in your init file: |
| 3684 | (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5 | 3685 | (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5 |
| 3685 | (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4 | 3686 | (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4 |
| 3686 | (add-hook 'mail-send-hook 'ispell-message) | 3687 | (add-hook 'mail-send-hook 'ispell-message) |
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index d8afb3e5544..8584c496a97 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | ;; To turn RefTeX Mode on and off in a buffer, use `M-x reftex-mode'. | 47 | ;; To turn RefTeX Mode on and off in a buffer, use `M-x reftex-mode'. |
| 48 | ;; | 48 | ;; |
| 49 | ;; To turn on RefTeX Mode for all LaTeX files, add the following lines | 49 | ;; To turn on RefTeX Mode for all LaTeX files, add the following lines |
| 50 | ;; to your .emacs file: | 50 | ;; to your init file: |
| 51 | ;; | 51 | ;; |
| 52 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode | 52 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode |
| 53 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode | 53 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode |
| @@ -99,7 +99,7 @@ | |||
| 99 | ;; | 99 | ;; |
| 100 | ;; To turn RefTeX Mode on and off in a particular buffer, use `M-x | 100 | ;; To turn RefTeX Mode on and off in a particular buffer, use `M-x |
| 101 | ;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the | 101 | ;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the |
| 102 | ;; following lines to your `.emacs' file: | 102 | ;; following lines to your init file: |
| 103 | ;; | 103 | ;; |
| 104 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode | 104 | ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode |
| 105 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode | 105 | ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 767f8f360bb..47a821c0148 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -81,7 +81,7 @@ | |||
| 81 | 81 | ||
| 82 | ;;; INSTALLATION | 82 | ;;; INSTALLATION |
| 83 | 83 | ||
| 84 | ;; Add the following lines to your `.emacs' file: | 84 | ;; Add the following lines to your init file: |
| 85 | ;; | 85 | ;; |
| 86 | ;; (require 'rst) | 86 | ;; (require 'rst) |
| 87 | ;; | 87 | ;; |
| @@ -103,11 +103,51 @@ | |||
| 103 | 103 | ||
| 104 | ;;; Code: | 104 | ;;; Code: |
| 105 | 105 | ||
| 106 | ;; FIXME: Check through major mode conventions again. | ||
| 107 | |||
| 106 | ;; FIXME: Add proper ";;;###autoload" comments. | 108 | ;; FIXME: Add proper ";;;###autoload" comments. |
| 107 | 109 | ||
| 108 | ;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*- | 110 | ;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*- |
| 109 | ;; lexical-binding: t -*-" in the first line. | 111 | ;; lexical-binding: t -*-" in the first line. |
| 110 | 112 | ||
| 113 | ;; FIXME: Use `testcover'. | ||
| 114 | |||
| 115 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 116 | ;; Support for `testcover' | ||
| 117 | |||
| 118 | (when (boundp 'testcover-1value-functions) | ||
| 119 | ;; Below `lambda' is used in a loop with varying parameters and is thus not | ||
| 120 | ;; 1valued. | ||
| 121 | (setq testcover-1value-functions | ||
| 122 | (delq 'lambda testcover-1value-functions)) | ||
| 123 | (add-to-list 'testcover-compose-functions 'lambda)) | ||
| 124 | |||
| 125 | (defun rst-testcover-defcustom () | ||
| 126 | "Remove all customized variables from `testcover-module-constants'. | ||
| 127 | This seems to be a bug in `testcover': `defcustom' variables are | ||
| 128 | considered constants. Revert it with this function after each `defcustom'." | ||
| 129 | (when (boundp 'testcover-module-constants) | ||
| 130 | (setq testcover-module-constants | ||
| 131 | (delq nil | ||
| 132 | (mapcar | ||
| 133 | (lambda (sym) | ||
| 134 | (if (not (plist-member (symbol-plist sym) 'standard-value)) | ||
| 135 | sym)) | ||
| 136 | testcover-module-constants))))) | ||
| 137 | |||
| 138 | (defun rst-testcover-add-compose (fun) | ||
| 139 | "Add FUN to `testcover-compose-functions'." | ||
| 140 | (when (boundp 'testcover-compose-functions) | ||
| 141 | (add-to-list 'testcover-compose-functions fun))) | ||
| 142 | |||
| 143 | (defun rst-testcover-add-1value (fun) | ||
| 144 | "Add FUN to `testcover-1value-functions'." | ||
| 145 | (when (boundp 'testcover-1value-functions) | ||
| 146 | (add-to-list 'testcover-1value-functions fun))) | ||
| 147 | |||
| 148 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 149 | ;; Common Lisp stuff | ||
| 150 | |||
| 111 | ;; Only use of macros is allowed - may be replaced by `cl-lib' some time. | 151 | ;; Only use of macros is allowed - may be replaced by `cl-lib' some time. |
| 112 | (eval-when-compile | 152 | (eval-when-compile |
| 113 | (require 'cl)) | 153 | (require 'cl)) |
| @@ -160,6 +200,7 @@ Comparison done with `equal'." | |||
| 160 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 200 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 161 | ;; Versions | 201 | ;; Versions |
| 162 | 202 | ||
| 203 | ;; testcover: ok. | ||
| 163 | (defun rst-extract-version (delim-re head-re re tail-re var &optional default) | 204 | (defun rst-extract-version (delim-re head-re re tail-re var &optional default) |
| 164 | "Extract the version from a variable according to the given regexes. | 205 | "Extract the version from a variable according to the given regexes. |
| 165 | Return the version after regex DELIM-RE and HEAD-RE matching RE | 206 | Return the version after regex DELIM-RE and HEAD-RE matching RE |
| @@ -173,7 +214,7 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match." | |||
| 173 | ;; Use CVSHeader to really get information from CVS and not other version | 214 | ;; Use CVSHeader to really get information from CVS and not other version |
| 174 | ;; control systems. | 215 | ;; control systems. |
| 175 | (defconst rst-cvs-header | 216 | (defconst rst-cvs-header |
| 176 | "$CVSHeader: sm/rst_el/rst.el,v 1.301 2012-07-30 19:29:46 stefan Exp $") | 217 | "$CVSHeader: sm/rst_el/rst.el,v 1.309.2.1 2012-09-17 17:30:49 stefan Exp $") |
| 177 | (defconst rst-cvs-rev | 218 | (defconst rst-cvs-rev |
| 178 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" | 219 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" |
| 179 | " .*" rst-cvs-header "0.0") | 220 | " .*" rst-cvs-header "0.0") |
| @@ -483,6 +524,8 @@ argument list for `rst-re'.") | |||
| 483 | (defvar rst-re-alist) ; Forward declare to use it in `rst-re'. | 524 | (defvar rst-re-alist) ; Forward declare to use it in `rst-re'. |
| 484 | 525 | ||
| 485 | ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel. | 526 | ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel. |
| 527 | (rst-testcover-add-compose 'rst-re) | ||
| 528 | ;; testcover: ok. | ||
| 486 | (defun rst-re (&rest args) | 529 | (defun rst-re (&rest args) |
| 487 | "Interpret ARGS as regular expressions and return a regex string. | 530 | "Interpret ARGS as regular expressions and return a regex string. |
| 488 | Each element of ARGS may be one of the following: | 531 | Each element of ARGS may be one of the following: |
| @@ -556,6 +599,7 @@ After interpretation of ARGS the results are concatenated as for | |||
| 556 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 599 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 557 | ;; Mode definition | 600 | ;; Mode definition |
| 558 | 601 | ||
| 602 | ;; testcover: ok. | ||
| 559 | (defun rst-define-key (keymap key def &rest deprecated) | 603 | (defun rst-define-key (keymap key def &rest deprecated) |
| 560 | "Bind like `define-key' but add deprecated key definitions. | 604 | "Bind like `define-key' but add deprecated key definitions. |
| 561 | KEYMAP, KEY, and DEF are as in `define-key'. DEPRECATED key | 605 | KEYMAP, KEY, and DEF are as in `define-key'. DEPRECATED key |
| @@ -734,6 +778,7 @@ This inherits from Text mode.") | |||
| 734 | The hook for `text-mode' is run before this one." | 778 | The hook for `text-mode' is run before this one." |
| 735 | :group 'rst | 779 | :group 'rst |
| 736 | :type '(hook)) | 780 | :type '(hook)) |
| 781 | (rst-testcover-defcustom) | ||
| 737 | 782 | ||
| 738 | ;; Pull in variable definitions silencing byte-compiler. | 783 | ;; Pull in variable definitions silencing byte-compiler. |
| 739 | (require 'newcomment) | 784 | (require 'newcomment) |
| @@ -949,6 +994,7 @@ file." | |||
| 949 | (const :tag "Underline only" simple)) | 994 | (const :tag "Underline only" simple)) |
| 950 | (integer :tag "Indentation for overline and underline type" | 995 | (integer :tag "Indentation for overline and underline type" |
| 951 | :value 0)))) | 996 | :value 0)))) |
| 997 | (rst-testcover-defcustom) | ||
| 952 | 998 | ||
| 953 | (defcustom rst-default-indent 1 | 999 | (defcustom rst-default-indent 1 |
| 954 | "Number of characters to indent the section title. | 1000 | "Number of characters to indent the section title. |
| @@ -958,7 +1004,7 @@ from a simple adornment style to a over-and-under adornment | |||
| 958 | style." | 1004 | style." |
| 959 | :group 'rst-adjust | 1005 | :group 'rst-adjust |
| 960 | :type '(integer)) | 1006 | :type '(integer)) |
| 961 | 1007 | (rst-testcover-defcustom) | |
| 962 | 1008 | ||
| 963 | (defun rst-compare-adornments (ado1 ado2) | 1009 | (defun rst-compare-adornments (ado1 ado2) |
| 964 | "Compare adornments. | 1010 | "Compare adornments. |
| @@ -979,7 +1025,8 @@ not found." | |||
| 979 | (setq cur (cdr cur))) | 1025 | (setq cur (cdr cur))) |
| 980 | cur)) | 1026 | cur)) |
| 981 | 1027 | ||
| 982 | 1028 | ;; testcover: FIXME: Test with `rst-preferred-adornments' == nil. Add test | |
| 1029 | ;; `rst-adjust-no-preference'. | ||
| 983 | (defun rst-suggest-new-adornment (allados &optional prev) | 1030 | (defun rst-suggest-new-adornment (allados &optional prev) |
| 984 | "Suggest a new, different adornment from all that have been seen. | 1031 | "Suggest a new, different adornment from all that have been seen. |
| 985 | 1032 | ||
| @@ -1032,7 +1079,7 @@ requested adornment." | |||
| 1032 | len) | 1079 | len) |
| 1033 | 1080 | ||
| 1034 | ;; Fixup whitespace at the beginning and end of the line. | 1081 | ;; Fixup whitespace at the beginning and end of the line. |
| 1035 | (if (or (null indent) (eq style 'simple)) | 1082 | (if (or (null indent) (eq style 'simple)) ;; testcover: ok. |
| 1036 | (setq indent 0)) | 1083 | (setq indent 0)) |
| 1037 | (beginning-of-line) | 1084 | (beginning-of-line) |
| 1038 | (delete-horizontal-space) | 1085 | (delete-horizontal-space) |
| @@ -1046,7 +1093,8 @@ requested adornment." | |||
| 1046 | 1093 | ||
| 1047 | ;; Remove previous line if it is an adornment. | 1094 | ;; Remove previous line if it is an adornment. |
| 1048 | (save-excursion | 1095 | (save-excursion |
| 1049 | (forward-line -1) | 1096 | (forward-line -1) ;; testcover: FIXME: Doesn't work when in first line |
| 1097 | ;; of buffer. | ||
| 1050 | (if (and (looking-at (rst-re 'ado-beg-2-1)) | 1098 | (if (and (looking-at (rst-re 'ado-beg-2-1)) |
| 1051 | ;; Avoid removing the underline of a title right above us. | 1099 | ;; Avoid removing the underline of a title right above us. |
| 1052 | (save-excursion (forward-line -1) | 1100 | (save-excursion (forward-line -1) |
| @@ -1055,7 +1103,8 @@ requested adornment." | |||
| 1055 | 1103 | ||
| 1056 | ;; Remove following line if it is an adornment. | 1104 | ;; Remove following line if it is an adornment. |
| 1057 | (save-excursion | 1105 | (save-excursion |
| 1058 | (forward-line +1) | 1106 | (forward-line +1) ;; testcover: FIXME: Doesn't work when in last line |
| 1107 | ;; of buffer. | ||
| 1059 | (if (looking-at (rst-re 'ado-beg-2-1)) | 1108 | (if (looking-at (rst-re 'ado-beg-2-1)) |
| 1060 | (rst-delete-entire-line)) | 1109 | (rst-delete-entire-line)) |
| 1061 | ;; Add a newline if we're at the end of the buffer, for the subsequence | 1110 | ;; Add a newline if we're at the end of the buffer, for the subsequence |
| @@ -1071,13 +1120,14 @@ requested adornment." | |||
| 1071 | (insert (make-string len char)))) | 1120 | (insert (make-string len char)))) |
| 1072 | 1121 | ||
| 1073 | ;; Insert underline. | 1122 | ;; Insert underline. |
| 1074 | (forward-line +1) | 1123 | (1value ;; Line has been inserted above. |
| 1124 | (forward-line +1)) | ||
| 1075 | (open-line 1) | 1125 | (open-line 1) |
| 1076 | (insert (make-string len char)) | 1126 | (insert (make-string len char)) |
| 1077 | 1127 | ||
| 1078 | (forward-line +1) | 1128 | (1value ;; Line has been inserted above. |
| 1079 | (goto-char marker) | 1129 | (forward-line +1)) |
| 1080 | )) | 1130 | (goto-char marker))) |
| 1081 | 1131 | ||
| 1082 | (defun rst-classify-adornment (adornment end) | 1132 | (defun rst-classify-adornment (adornment end) |
| 1083 | "Classify adornment for section titles and transitions. | 1133 | "Classify adornment for section titles and transitions. |
| @@ -1104,11 +1154,14 @@ Return nil if no syntactically valid adornment is found." | |||
| 1104 | (ado-re (rst-re ado-ch 'adorep3-hlp)) | 1154 | (ado-re (rst-re ado-ch 'adorep3-hlp)) |
| 1105 | (end-pnt (point)) | 1155 | (end-pnt (point)) |
| 1106 | (beg-pnt (progn | 1156 | (beg-pnt (progn |
| 1107 | (forward-line 0) | 1157 | (1value ;; No lines may be left to move. |
| 1158 | (forward-line 0)) | ||
| 1108 | (point))) | 1159 | (point))) |
| 1109 | (nxt-emp ; Next line nonexistent or empty | 1160 | (nxt-emp ; Next line nonexistent or empty |
| 1110 | (save-excursion | 1161 | (save-excursion |
| 1111 | (or (not (zerop (forward-line 1))) | 1162 | (or (not (zerop (forward-line 1))) |
| 1163 | ;; testcover: FIXME: Add test classifying at the end of | ||
| 1164 | ;; buffer. | ||
| 1112 | (looking-at (rst-re 'lin-end))))) | 1165 | (looking-at (rst-re 'lin-end))))) |
| 1113 | (prv-emp ; Previous line nonexistent or empty | 1166 | (prv-emp ; Previous line nonexistent or empty |
| 1114 | (save-excursion | 1167 | (save-excursion |
| @@ -1117,7 +1170,9 @@ Return nil if no syntactically valid adornment is found." | |||
| 1117 | (ttl-blw ; Title found below starting here. | 1170 | (ttl-blw ; Title found below starting here. |
| 1118 | (save-excursion | 1171 | (save-excursion |
| 1119 | (and | 1172 | (and |
| 1120 | (zerop (forward-line 1)) | 1173 | (zerop (forward-line 1)) ;; testcover: FIXME: Add test |
| 1174 | ;; classifying at the end of | ||
| 1175 | ;; buffer. | ||
| 1121 | (looking-at (rst-re 'ttl-beg)) | 1176 | (looking-at (rst-re 'ttl-beg)) |
| 1122 | (point)))) | 1177 | (point)))) |
| 1123 | (ttl-abv ; Title found above starting here. | 1178 | (ttl-abv ; Title found above starting here. |
| @@ -1129,7 +1184,9 @@ Return nil if no syntactically valid adornment is found." | |||
| 1129 | (und-fnd ; Matching underline found starting here. | 1184 | (und-fnd ; Matching underline found starting here. |
| 1130 | (save-excursion | 1185 | (save-excursion |
| 1131 | (and ttl-blw | 1186 | (and ttl-blw |
| 1132 | (zerop (forward-line 2)) | 1187 | (zerop (forward-line 2)) ;; testcover: FIXME: Add test |
| 1188 | ;; classifying at the end of | ||
| 1189 | ;; buffer. | ||
| 1133 | (looking-at (rst-re ado-re 'lin-end)) | 1190 | (looking-at (rst-re ado-re 'lin-end)) |
| 1134 | (point)))) | 1191 | (point)))) |
| 1135 | (ovr-fnd ; Matching overline found starting here. | 1192 | (ovr-fnd ; Matching overline found starting here. |
| @@ -1174,8 +1231,8 @@ Return nil if no syntactically valid adornment is found." | |||
| 1174 | (setq key nil))) | 1231 | (setq key nil))) |
| 1175 | (if key | 1232 | (if key |
| 1176 | (list key | 1233 | (list key |
| 1177 | (or beg-ovr beg-txt beg-und) | 1234 | (or beg-ovr beg-txt) |
| 1178 | (or end-und end-txt end-ovr) | 1235 | (or end-und end-txt) |
| 1179 | beg-ovr end-ovr beg-txt end-txt beg-und end-und))))))) | 1236 | beg-ovr end-ovr beg-txt end-txt beg-und end-und))))))) |
| 1180 | 1237 | ||
| 1181 | (defun rst-find-title-line () | 1238 | (defun rst-find-title-line () |
| @@ -1193,7 +1250,8 @@ in the first element. If there is no adornment around the title | |||
| 1193 | CHARACTER is also nil and match groups for overline and underline | 1250 | CHARACTER is also nil and match groups for overline and underline |
| 1194 | are nil." | 1251 | are nil." |
| 1195 | (save-excursion | 1252 | (save-excursion |
| 1196 | (forward-line 0) | 1253 | (1value ;; No lines may be left to move. |
| 1254 | (forward-line 0)) | ||
| 1197 | (let ((orig-pnt (point)) | 1255 | (let ((orig-pnt (point)) |
| 1198 | (orig-end (line-end-position))) | 1256 | (orig-end (line-end-position))) |
| 1199 | (cond | 1257 | (cond |
| @@ -1253,6 +1311,7 @@ t when no section adornments were found. Value depends on | |||
| 1253 | `rst-all-sections'.") | 1311 | `rst-all-sections'.") |
| 1254 | (make-variable-buffer-local 'rst-section-hierarchy) | 1312 | (make-variable-buffer-local 'rst-section-hierarchy) |
| 1255 | 1313 | ||
| 1314 | (rst-testcover-add-1value 'rst-reset-section-caches) | ||
| 1256 | (defun rst-reset-section-caches () | 1315 | (defun rst-reset-section-caches () |
| 1257 | "Reset all section cache variables. | 1316 | "Reset all section cache variables. |
| 1258 | Should be called by interactive functions which deal with sections." | 1317 | Should be called by interactive functions which deal with sections." |
| @@ -1354,9 +1413,7 @@ Return a list of the previous and next adornments." | |||
| 1354 | (if (and cur (caar cur)) | 1413 | (if (and cur (caar cur)) |
| 1355 | (setq next (if (= curline (caar cur)) (cdr cur) cur))) | 1414 | (setq next (if (= curline (caar cur)) (cdr cur) cur))) |
| 1356 | 1415 | ||
| 1357 | (mapcar 'cdar (list prev next)) | 1416 | (mapcar 'cdar (list prev next)))) |
| 1358 | )) | ||
| 1359 | |||
| 1360 | 1417 | ||
| 1361 | (defun rst-adornment-complete-p (ado) | 1418 | (defun rst-adornment-complete-p (ado) |
| 1362 | "Return true if the adornment ADO around point is complete." | 1419 | "Return true if the adornment ADO around point is complete." |
| @@ -1369,8 +1426,7 @@ Return a list of the previous and next adornments." | |||
| 1369 | (let* ((char (car ado)) | 1426 | (let* ((char (car ado)) |
| 1370 | (style (cadr ado)) | 1427 | (style (cadr ado)) |
| 1371 | (indent (caddr ado)) | 1428 | (indent (caddr ado)) |
| 1372 | (endcol (save-excursion (end-of-line) (current-column))) | 1429 | (endcol (save-excursion (end-of-line) (current-column)))) |
| 1373 | ) | ||
| 1374 | (if char | 1430 | (if char |
| 1375 | (let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$"))) | 1431 | (let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$"))) |
| 1376 | (and | 1432 | (and |
| @@ -1380,9 +1436,7 @@ Return a list of the previous and next adornments." | |||
| 1380 | (or (not (eq style 'over-and-under)) | 1436 | (or (not (eq style 'over-and-under)) |
| 1381 | (save-excursion (forward-line -1) | 1437 | (save-excursion (forward-line -1) |
| 1382 | (beginning-of-line) | 1438 | (beginning-of-line) |
| 1383 | (looking-at exps)))) | 1439 | (looking-at exps)))))))) |
| 1384 | )) | ||
| 1385 | )) | ||
| 1386 | 1440 | ||
| 1387 | 1441 | ||
| 1388 | (defun rst-get-next-adornment | 1442 | (defun rst-get-next-adornment |
| @@ -1414,8 +1468,7 @@ REVERSE-DIRECTION is used to reverse the cycling order." | |||
| 1414 | cur)) | 1468 | cur)) |
| 1415 | 1469 | ||
| 1416 | ;; If not found, take the first of all adornments. | 1470 | ;; If not found, take the first of all adornments. |
| 1417 | suggestion | 1471 | suggestion))) |
| 1418 | ))) | ||
| 1419 | 1472 | ||
| 1420 | 1473 | ||
| 1421 | ;; FIXME: A line "``/`` full" is not accepted as a section title. | 1474 | ;; FIXME: A line "``/`` full" is not accepted as a section title. |
| @@ -1456,7 +1509,7 @@ b. a negative numerical argument, which generally inverts the | |||
| 1456 | (reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0))) | 1509 | (reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0))) |
| 1457 | (toggle-style (and pfxarg (not reverse-direction)))) | 1510 | (toggle-style (and pfxarg (not reverse-direction)))) |
| 1458 | 1511 | ||
| 1459 | (if (rst-portable-mark-active-p) | 1512 | (if (use-region-p) |
| 1460 | ;; Adjust adornments within region. | 1513 | ;; Adjust adornments within region. |
| 1461 | (rst-promote-region (and pfxarg t)) | 1514 | (rst-promote-region (and pfxarg t)) |
| 1462 | ;; Adjust adornment around point. | 1515 | ;; Adjust adornment around point. |
| @@ -1466,15 +1519,14 @@ b. a negative numerical argument, which generally inverts the | |||
| 1466 | (run-hooks 'rst-adjust-hook) | 1519 | (run-hooks 'rst-adjust-hook) |
| 1467 | 1520 | ||
| 1468 | ;; Make sure to reset the cursor position properly after we're done. | 1521 | ;; Make sure to reset the cursor position properly after we're done. |
| 1469 | (goto-char origpt) | 1522 | (goto-char origpt))) |
| 1470 | |||
| 1471 | )) | ||
| 1472 | 1523 | ||
| 1473 | (defcustom rst-adjust-hook nil | 1524 | (defcustom rst-adjust-hook nil |
| 1474 | "Hooks to be run after running `rst-adjust'." | 1525 | "Hooks to be run after running `rst-adjust'." |
| 1475 | :group 'rst-adjust | 1526 | :group 'rst-adjust |
| 1476 | :type '(hook) | 1527 | :type '(hook) |
| 1477 | :package-version '(rst . "1.1.0")) | 1528 | :package-version '(rst . "1.1.0")) |
| 1529 | (rst-testcover-defcustom) | ||
| 1478 | 1530 | ||
| 1479 | (defcustom rst-new-adornment-down nil | 1531 | (defcustom rst-new-adornment-down nil |
| 1480 | "Controls level of new adornment for section headers." | 1532 | "Controls level of new adornment for section headers." |
| @@ -1483,6 +1535,7 @@ b. a negative numerical argument, which generally inverts the | |||
| 1483 | (const :tag "Same level as previous one" nil) | 1535 | (const :tag "Same level as previous one" nil) |
| 1484 | (const :tag "One level down relative to the previous one" t)) | 1536 | (const :tag "One level down relative to the previous one" t)) |
| 1485 | :package-version '(rst . "1.1.0")) | 1537 | :package-version '(rst . "1.1.0")) |
| 1538 | (rst-testcover-defcustom) | ||
| 1486 | 1539 | ||
| 1487 | (defun rst-adjust-adornment (pfxarg) | 1540 | (defun rst-adjust-adornment (pfxarg) |
| 1488 | "Call `rst-adjust-adornment-work' interactively. | 1541 | "Call `rst-adjust-adornment-work' interactively. |
| @@ -1741,8 +1794,7 @@ hierarchy is similar to that used by `rst-adjust-adornment-work'." | |||
| 1741 | (region-begin-line (line-number-at-pos (region-beginning))) | 1794 | (region-begin-line (line-number-at-pos (region-beginning))) |
| 1742 | (region-end-line (line-number-at-pos (region-end))) | 1795 | (region-end-line (line-number-at-pos (region-end))) |
| 1743 | 1796 | ||
| 1744 | marker-list | 1797 | marker-list) |
| 1745 | ) | ||
| 1746 | 1798 | ||
| 1747 | ;; Skip the markers that come before the region beginning. | 1799 | ;; Skip the markers that come before the region beginning. |
| 1748 | (while (and cur (< (caar cur) region-begin-line)) | 1800 | (while (and cur (< (caar cur) region-begin-line)) |
| @@ -1771,8 +1823,7 @@ hierarchy is similar to that used by `rst-adjust-adornment-work'." | |||
| 1771 | 1823 | ||
| 1772 | ;; Clear marker to avoid slowing down the editing after we're done. | 1824 | ;; Clear marker to avoid slowing down the editing after we're done. |
| 1773 | (set-marker (car p) nil)) | 1825 | (set-marker (car p) nil)) |
| 1774 | (setq deactivate-mark nil) | 1826 | (setq deactivate-mark nil)))) |
| 1775 | ))) | ||
| 1776 | 1827 | ||
| 1777 | 1828 | ||
| 1778 | 1829 | ||
| @@ -1792,9 +1843,7 @@ in ADORNMENTS." | |||
| 1792 | (apply 'rst-update-section x) | 1843 | (apply 'rst-update-section x) |
| 1793 | (goto-char (point-max)) | 1844 | (goto-char (point-max)) |
| 1794 | (insert "\n") | 1845 | (insert "\n") |
| 1795 | (incf level) | 1846 | (incf level)))))) |
| 1796 | )) | ||
| 1797 | ))) | ||
| 1798 | 1847 | ||
| 1799 | (defun rst-straighten-adornments () | 1848 | (defun rst-straighten-adornments () |
| 1800 | "Redo all the adornments in the current buffer. | 1849 | "Redo all the adornments in the current buffer. |
| @@ -1822,10 +1871,7 @@ in order to adapt it to our preferred style." | |||
| 1822 | (apply 'rst-update-section (nth (car lm) rst-preferred-adornments)) | 1871 | (apply 'rst-update-section (nth (car lm) rst-preferred-adornments)) |
| 1823 | 1872 | ||
| 1824 | ;; Reset the marker to avoid slowing down editing until it gets GC'ed. | 1873 | ;; Reset the marker to avoid slowing down editing until it gets GC'ed. |
| 1825 | (set-marker (cdr lm) nil) | 1874 | (set-marker (cdr lm) nil))))) |
| 1826 | ) | ||
| 1827 | ))) | ||
| 1828 | |||
| 1829 | 1875 | ||
| 1830 | 1876 | ||
| 1831 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1877 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -1906,7 +1952,7 @@ and the column of the point." | |||
| 1906 | (looking-at pfx-re)))))) ; ...pfx at same level. | 1952 | (looking-at pfx-re)))))) ; ...pfx at same level. |
| 1907 | (push (cons (point) (current-column)) | 1953 | (push (cons (point) (current-column)) |
| 1908 | pfx)) | 1954 | pfx)) |
| 1909 | (forward-line 1)) ) | 1955 | (forward-line 1))) |
| 1910 | (nreverse pfx))) | 1956 | (nreverse pfx))) |
| 1911 | 1957 | ||
| 1912 | (defun rst-insert-list-pos (newitem) | 1958 | (defun rst-insert-list-pos (newitem) |
| @@ -2005,6 +2051,7 @@ starting item, for example 'e' for 'A)' style. The position is also arranged by | |||
| 2005 | :tag (char-to-string char) char)) | 2051 | :tag (char-to-string char) char)) |
| 2006 | rst-bullets))) | 2052 | rst-bullets))) |
| 2007 | :package-version '(rst . "1.1.0")) | 2053 | :package-version '(rst . "1.1.0")) |
| 2054 | (rst-testcover-defcustom) | ||
| 2008 | 2055 | ||
| 2009 | (defun rst-insert-list-continue (curitem prefer-roman) | 2056 | (defun rst-insert-list-continue (curitem prefer-roman) |
| 2010 | "Insert a list item with list start CURITEM including its indentation level. | 2057 | "Insert a list item with list start CURITEM including its indentation level. |
| @@ -2206,8 +2253,7 @@ list destructively." | |||
| 2206 | (setq node (cons nil (cdaar children)))) | 2253 | (setq node (cons nil (cdaar children)))) |
| 2207 | 2254 | ||
| 2208 | ;; Return this node with its children. | 2255 | ;; Return this node with its children. |
| 2209 | (cons node children) | 2256 | (cons node children))) |
| 2210 | )) | ||
| 2211 | 2257 | ||
| 2212 | 2258 | ||
| 2213 | (defun rst-section-tree-point (node &optional point) | 2259 | (defun rst-section-tree-point (node &optional point) |
| @@ -2241,11 +2287,8 @@ container subtree node that we're returning." | |||
| 2241 | (let ((sub (rst-section-tree-point (car last) curpoint))) | 2287 | (let ((sub (rst-section-tree-point (car last) curpoint))) |
| 2242 | (setq path (car sub) | 2288 | (setq path (car sub) |
| 2243 | outtree (cdr sub))) | 2289 | outtree (cdr sub))) |
| 2244 | (setq outtree node)) | 2290 | (setq outtree node))))) |
| 2245 | 2291 | (cons (cons (car node) path) outtree))) | |
| 2246 | ))) | ||
| 2247 | (cons (cons (car node) path) outtree) | ||
| 2248 | )) | ||
| 2249 | 2292 | ||
| 2250 | 2293 | ||
| 2251 | (defgroup rst-toc nil | 2294 | (defgroup rst-toc nil |
| @@ -2257,6 +2300,7 @@ container subtree node that we're returning." | |||
| 2257 | "Indentation for table-of-contents display. | 2300 | "Indentation for table-of-contents display. |
| 2258 | Also used for formatting insertion, when numbering is disabled." | 2301 | Also used for formatting insertion, when numbering is disabled." |
| 2259 | :group 'rst-toc) | 2302 | :group 'rst-toc) |
| 2303 | (rst-testcover-defcustom) | ||
| 2260 | 2304 | ||
| 2261 | (defcustom rst-toc-insert-style 'fixed | 2305 | (defcustom rst-toc-insert-style 'fixed |
| 2262 | "Insertion style for table-of-contents. | 2306 | "Insertion style for table-of-contents. |
| @@ -2267,10 +2311,12 @@ indentation style: | |||
| 2267 | - aligned: numbering, titles aligned under each other | 2311 | - aligned: numbering, titles aligned under each other |
| 2268 | - listed: numbering, with dashes like list items (EXPERIMENTAL)" | 2312 | - listed: numbering, with dashes like list items (EXPERIMENTAL)" |
| 2269 | :group 'rst-toc) | 2313 | :group 'rst-toc) |
| 2314 | (rst-testcover-defcustom) | ||
| 2270 | 2315 | ||
| 2271 | (defcustom rst-toc-insert-number-separator " " | 2316 | (defcustom rst-toc-insert-number-separator " " |
| 2272 | "Separator that goes between the TOC number and the title." | 2317 | "Separator that goes between the TOC number and the title." |
| 2273 | :group 'rst-toc) | 2318 | :group 'rst-toc) |
| 2319 | (rst-testcover-defcustom) | ||
| 2274 | 2320 | ||
| 2275 | ;; This is used to avoid having to change the user's mode. | 2321 | ;; This is used to avoid having to change the user's mode. |
| 2276 | (defvar rst-toc-insert-click-keymap | 2322 | (defvar rst-toc-insert-click-keymap |
| @@ -2282,7 +2328,7 @@ indentation style: | |||
| 2282 | (defcustom rst-toc-insert-max-level nil | 2328 | (defcustom rst-toc-insert-max-level nil |
| 2283 | "If non-nil, maximum depth of the inserted TOC." | 2329 | "If non-nil, maximum depth of the inserted TOC." |
| 2284 | :group 'rst-toc) | 2330 | :group 'rst-toc) |
| 2285 | 2331 | (rst-testcover-defcustom) | |
| 2286 | 2332 | ||
| 2287 | (defun rst-toc-insert (&optional pfxarg) | 2333 | (defun rst-toc-insert (&optional pfxarg) |
| 2288 | "Insert a simple text rendering of the table of contents. | 2334 | "Insert a simple text rendering of the table of contents. |
| @@ -2316,8 +2362,7 @@ The TOC is inserted indented at the current column." | |||
| 2316 | (delete-region init-point (+ init-point (length initial-indent))) | 2362 | (delete-region init-point (+ init-point (length initial-indent))) |
| 2317 | 2363 | ||
| 2318 | ;; Delete the last newline added. | 2364 | ;; Delete the last newline added. |
| 2319 | (delete-char -1) | 2365 | (delete-char -1)))) |
| 2320 | ))) | ||
| 2321 | 2366 | ||
| 2322 | (defun rst-toc-insert-node (node level indent pfx) | 2367 | (defun rst-toc-insert-node (node level indent pfx) |
| 2323 | "Insert tree node NODE in table-of-contents. | 2368 | "Insert tree node NODE in table-of-contents. |
| @@ -2343,9 +2388,7 @@ level to align." | |||
| 2343 | ;; is generated automatically. | 2388 | ;; is generated automatically. |
| 2344 | (put-text-property b (point) 'mouse-face 'highlight) | 2389 | (put-text-property b (point) 'mouse-face 'highlight) |
| 2345 | (put-text-property b (point) 'rst-toc-target (cadar node)) | 2390 | (put-text-property b (point) 'rst-toc-target (cadar node)) |
| 2346 | (put-text-property b (point) 'keymap rst-toc-insert-click-keymap) | 2391 | (put-text-property b (point) 'keymap rst-toc-insert-click-keymap)) |
| 2347 | |||
| 2348 | ) | ||
| 2349 | (insert "\n") | 2392 | (insert "\n") |
| 2350 | 2393 | ||
| 2351 | ;; Prepare indent for children. | 2394 | ;; Prepare indent for children. |
| @@ -2362,9 +2405,7 @@ level to align." | |||
| 2362 | 2405 | ||
| 2363 | ((eq rst-toc-insert-style 'listed) | 2406 | ((eq rst-toc-insert-style 'listed) |
| 2364 | (concat (substring indent 0 -3) | 2407 | (concat (substring indent 0 -3) |
| 2365 | (concat (make-string (+ (length pfx) 2) ? ) " - "))) | 2408 | (concat (make-string (+ (length pfx) 2) ? ) " - ")))))) |
| 2366 | )) | ||
| 2367 | ) | ||
| 2368 | 2409 | ||
| 2369 | (if (or (eq rst-toc-insert-max-level nil) | 2410 | (if (or (eq rst-toc-insert-max-level nil) |
| 2370 | (< level rst-toc-insert-max-level)) | 2411 | (< level rst-toc-insert-max-level)) |
| @@ -2382,8 +2423,7 @@ level to align." | |||
| 2382 | (if (cdr node) | 2423 | (if (cdr node) |
| 2383 | (setq fmt (format "%%-%dd" | 2424 | (setq fmt (format "%%-%dd" |
| 2384 | (1+ (floor (log10 (length | 2425 | (1+ (floor (log10 (length |
| 2385 | (cdr node)))))))) | 2426 | (cdr node)))))))))) |
| 2386 | )) | ||
| 2387 | 2427 | ||
| 2388 | (dolist (child (cdr node)) | 2428 | (dolist (child (cdr node)) |
| 2389 | (rst-toc-insert-node child | 2429 | (rst-toc-insert-node child |
| @@ -2391,9 +2431,7 @@ level to align." | |||
| 2391 | indent | 2431 | indent |
| 2392 | (if do-child-numbering | 2432 | (if do-child-numbering |
| 2393 | (concat pfx (format fmt count)) pfx)) | 2433 | (concat pfx (format fmt count)) pfx)) |
| 2394 | (incf count))) | 2434 | (incf count)))))) |
| 2395 | |||
| 2396 | ))) | ||
| 2397 | 2435 | ||
| 2398 | 2436 | ||
| 2399 | (defun rst-toc-update () | 2437 | (defun rst-toc-update () |
| @@ -2468,8 +2506,7 @@ file-write hook to always make it up-to-date automatically." | |||
| 2468 | ;; Add link on lines. | 2506 | ;; Add link on lines. |
| 2469 | (put-text-property b (point) 'rst-toc-target (cadar node)) | 2507 | (put-text-property b (point) 'rst-toc-target (cadar node)) |
| 2470 | 2508 | ||
| 2471 | (insert "\n") | 2509 | (insert "\n"))) |
| 2472 | )) | ||
| 2473 | 2510 | ||
| 2474 | (dolist (child (cdr node)) | 2511 | (dolist (child (cdr node)) |
| 2475 | (rst-toc-node child (1+ level)))) | 2512 | (rst-toc-node child (1+ level)))) |
| @@ -2517,8 +2554,7 @@ brings the cursor in that section." | |||
| 2517 | line | 2554 | line |
| 2518 | 2555 | ||
| 2519 | ;; Create a temporary buffer. | 2556 | ;; Create a temporary buffer. |
| 2520 | (buf (get-buffer-create rst-toc-buffer-name)) | 2557 | (buf (get-buffer-create rst-toc-buffer-name))) |
| 2521 | ) | ||
| 2522 | 2558 | ||
| 2523 | (with-current-buffer buf | 2559 | (with-current-buffer buf |
| 2524 | (let ((inhibit-read-only t)) | 2560 | (let ((inhibit-read-only t)) |
| @@ -2531,8 +2567,7 @@ brings the cursor in that section." | |||
| 2531 | 2567 | ||
| 2532 | ;; Count the lines to our found node. | 2568 | ;; Count the lines to our found node. |
| 2533 | (let ((linefound (rst-toc-count-lines sectree our-node))) | 2569 | (let ((linefound (rst-toc-count-lines sectree our-node))) |
| 2534 | (setq line (if (cdr linefound) (car linefound) 0))) | 2570 | (setq line (if (cdr linefound) (car linefound) 0))))) |
| 2535 | )) | ||
| 2536 | (display-buffer buf) | 2571 | (display-buffer buf) |
| 2537 | (pop-to-buffer buf) | 2572 | (pop-to-buffer buf) |
| 2538 | 2573 | ||
| @@ -2541,8 +2576,7 @@ brings the cursor in that section." | |||
| 2541 | 2576 | ||
| 2542 | ;; Move the cursor near the right section in the TOC. | 2577 | ;; Move the cursor near the right section in the TOC. |
| 2543 | (goto-char (point-min)) | 2578 | (goto-char (point-min)) |
| 2544 | (forward-line (1- line)) | 2579 | (forward-line (1- line)))) |
| 2545 | )) | ||
| 2546 | 2580 | ||
| 2547 | 2581 | ||
| 2548 | (defun rst-toc-mode-find-section () | 2582 | (defun rst-toc-mode-find-section () |
| @@ -2644,8 +2678,7 @@ backwards in the file (default is to use 1)." | |||
| 2644 | (curline (line-number-at-pos)) | 2678 | (curline (line-number-at-pos)) |
| 2645 | 2679 | ||
| 2646 | (cur allados) | 2680 | (cur allados) |
| 2647 | (idx 0) | 2681 | (idx 0)) |
| 2648 | ) | ||
| 2649 | 2682 | ||
| 2650 | ;; Find the index of the "next" adornment w.r.t. to the current line. | 2683 | ;; Find the index of the "next" adornment w.r.t. to the current line. |
| 2651 | (while (and cur (< (caar cur) curline)) | 2684 | (while (and cur (< (caar cur) curline)) |
| @@ -2666,8 +2699,7 @@ backwards in the file (default is to use 1)." | |||
| 2666 | (progn | 2699 | (progn |
| 2667 | (goto-char (point-min)) | 2700 | (goto-char (point-min)) |
| 2668 | (forward-line (1- (car cur)))) | 2701 | (forward-line (1- (car cur)))) |
| 2669 | (if (> offset 0) (goto-char (point-max)) (goto-char (point-min)))) | 2702 | (if (> offset 0) (goto-char (point-max)) (goto-char (point-min)))))) |
| 2670 | )) | ||
| 2671 | 2703 | ||
| 2672 | (defun rst-backward-section () | 2704 | (defun rst-backward-section () |
| 2673 | "Like `rst-forward-section', except move back one title." | 2705 | "Like `rst-forward-section', except move back one title." |
| @@ -2686,7 +2718,7 @@ for negative COUNT." | |||
| 2686 | (error "Cannot mark zero sections")) | 2718 | (error "Cannot mark zero sections")) |
| 2687 | (cond ((and allow-extend | 2719 | (cond ((and allow-extend |
| 2688 | (or (and (eq last-command this-command) (mark t)) | 2720 | (or (and (eq last-command this-command) (mark t)) |
| 2689 | (rst-portable-mark-active-p))) | 2721 | (use-region-p))) |
| 2690 | (set-mark | 2722 | (set-mark |
| 2691 | (save-excursion | 2723 | (save-excursion |
| 2692 | (goto-char (mark)) | 2724 | (goto-char (mark)) |
| @@ -2742,17 +2774,14 @@ of each paragraph only." | |||
| 2742 | (valid (and (= curcol leftcol) | 2774 | (valid (and (= curcol leftcol) |
| 2743 | (not (looking-at (rst-re 'lin-end)))) | 2775 | (not (looking-at (rst-re 'lin-end)))) |
| 2744 | (and (= curcol leftcol) | 2776 | (and (= curcol leftcol) |
| 2745 | (not (looking-at (rst-re 'lin-end))))) | 2777 | (not (looking-at (rst-re 'lin-end)))))) |
| 2746 | ) | ||
| 2747 | ((>= (point) endm)) | 2778 | ((>= (point) endm)) |
| 2748 | 2779 | ||
| 2749 | (if (if ,first-only | 2780 | (if (if ,first-only |
| 2750 | (and valid (not previous)) | 2781 | (and valid (not previous)) |
| 2751 | valid) | 2782 | valid) |
| 2752 | ,body-consequent | 2783 | ,body-consequent |
| 2753 | ,body-alternative) | 2784 | ,body-alternative))))) |
| 2754 | |||
| 2755 | )))) | ||
| 2756 | 2785 | ||
| 2757 | ;; FIXME: This needs to be refactored. Probably this is simply a function | 2786 | ;; FIXME: This needs to be refactored. Probably this is simply a function |
| 2758 | ;; applying BODY rather than a macro. | 2787 | ;; applying BODY rather than a macro. |
| @@ -2785,13 +2814,10 @@ first of a paragraph." | |||
| 2785 | (,isleftmost (and (not ,isempty) | 2814 | (,isleftmost (and (not ,isempty) |
| 2786 | (= (current-column) ,leftmost)) | 2815 | (= (current-column) ,leftmost)) |
| 2787 | (and (not ,isempty) | 2816 | (and (not ,isempty) |
| 2788 | (= (current-column) ,leftmost))) | 2817 | (= (current-column) ,leftmost)))) |
| 2789 | ) | ||
| 2790 | ((>= (point) endm)) | 2818 | ((>= (point) endm)) |
| 2791 | 2819 | ||
| 2792 | (progn ,@body) | 2820 | (progn ,@body)))))) |
| 2793 | |||
| 2794 | ))))) | ||
| 2795 | 2821 | ||
| 2796 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2822 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 2797 | ;; Indentation | 2823 | ;; Indentation |
| @@ -2817,26 +2843,31 @@ here." | |||
| 2817 | "Indentation when there is no more indentation point given." | 2843 | "Indentation when there is no more indentation point given." |
| 2818 | :group 'rst-indent | 2844 | :group 'rst-indent |
| 2819 | :type '(integer)) | 2845 | :type '(integer)) |
| 2846 | (rst-testcover-defcustom) | ||
| 2820 | 2847 | ||
| 2821 | (defcustom rst-indent-field 3 | 2848 | (defcustom rst-indent-field 3 |
| 2822 | "Indentation for first line after a field or 0 to always indent for content." | 2849 | "Indentation for first line after a field or 0 to always indent for content." |
| 2823 | :group 'rst-indent | 2850 | :group 'rst-indent |
| 2824 | :type '(integer)) | 2851 | :type '(integer)) |
| 2852 | (rst-testcover-defcustom) | ||
| 2825 | 2853 | ||
| 2826 | (defcustom rst-indent-literal-normal 3 | 2854 | (defcustom rst-indent-literal-normal 3 |
| 2827 | "Default indentation for literal block after a markup on an own line." | 2855 | "Default indentation for literal block after a markup on an own line." |
| 2828 | :group 'rst-indent | 2856 | :group 'rst-indent |
| 2829 | :type '(integer)) | 2857 | :type '(integer)) |
| 2858 | (rst-testcover-defcustom) | ||
| 2830 | 2859 | ||
| 2831 | (defcustom rst-indent-literal-minimized 2 | 2860 | (defcustom rst-indent-literal-minimized 2 |
| 2832 | "Default indentation for literal block after a minimized markup." | 2861 | "Default indentation for literal block after a minimized markup." |
| 2833 | :group 'rst-indent | 2862 | :group 'rst-indent |
| 2834 | :type '(integer)) | 2863 | :type '(integer)) |
| 2864 | (rst-testcover-defcustom) | ||
| 2835 | 2865 | ||
| 2836 | (defcustom rst-indent-comment 3 | 2866 | (defcustom rst-indent-comment 3 |
| 2837 | "Default indentation for first line of a comment." | 2867 | "Default indentation for first line of a comment." |
| 2838 | :group 'rst-indent | 2868 | :group 'rst-indent |
| 2839 | :type '(integer)) | 2869 | :type '(integer)) |
| 2870 | (rst-testcover-defcustom) | ||
| 2840 | 2871 | ||
| 2841 | ;; FIXME: Must consider other tabs: | 2872 | ;; FIXME: Must consider other tabs: |
| 2842 | ;; * Line blocks | 2873 | ;; * Line blocks |
| @@ -3116,8 +3147,7 @@ do all lines instead of just paragraphs." | |||
| 3116 | (let ((ins-string (format "%d. " (incf count)))) | 3147 | (let ((ins-string (format "%d. " (incf count)))) |
| 3117 | (setq last-insert-len (length ins-string)) | 3148 | (setq last-insert-len (length ins-string)) |
| 3118 | (insert ins-string)) | 3149 | (insert ins-string)) |
| 3119 | (insert (make-string last-insert-len ?\ )) | 3150 | (insert (make-string last-insert-len ?\ ))))) |
| 3120 | ))) | ||
| 3121 | 3151 | ||
| 3122 | (defun rst-bullet-list-region (beg end all) | 3152 | (defun rst-bullet-list-region (beg end all) |
| 3123 | "Add bullets to all the leftmost paragraphs in the given region. | 3153 | "Add bullets to all the leftmost paragraphs in the given region. |
| @@ -3127,8 +3157,7 @@ do all lines instead of just paragraphs." | |||
| 3127 | (rst-iterate-leftmost-paragraphs | 3157 | (rst-iterate-leftmost-paragraphs |
| 3128 | beg end (not all) | 3158 | beg end (not all) |
| 3129 | (insert (car rst-preferred-bullets) " ") | 3159 | (insert (car rst-preferred-bullets) " ") |
| 3130 | (insert " ") | 3160 | (insert " "))) |
| 3131 | )) | ||
| 3132 | 3161 | ||
| 3133 | ;; FIXME: Does not deal with a varying number of digits appropriately. | 3162 | ;; FIXME: Does not deal with a varying number of digits appropriately. |
| 3134 | ;; FIXME: Does not deal with multiple levels independently. | 3163 | ;; FIXME: Does not deal with multiple levels independently. |
| @@ -3143,18 +3172,13 @@ Renumber as necessary. Region is from BEG to END." | |||
| 3143 | (cons (copy-marker (car x)) | 3172 | (cons (copy-marker (car x)) |
| 3144 | (cdr x))) | 3173 | (cdr x))) |
| 3145 | (rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1)))) | 3174 | (rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1)))) |
| 3146 | (count 1) | 3175 | (count 1)) |
| 3147 | ) | ||
| 3148 | (save-excursion | 3176 | (save-excursion |
| 3149 | (dolist (x items) | 3177 | (dolist (x items) |
| 3150 | (goto-char (car x)) | 3178 | (goto-char (car x)) |
| 3151 | (looking-at (rst-re 'itmany-beg-1)) | 3179 | (looking-at (rst-re 'itmany-beg-1)) |
| 3152 | (replace-match (format "%d." count) nil nil nil 1) | 3180 | (replace-match (format "%d." count) nil nil nil 1) |
| 3153 | (incf count) | 3181 | (incf count))))) |
| 3154 | )) | ||
| 3155 | )) | ||
| 3156 | |||
| 3157 | |||
| 3158 | 3182 | ||
| 3159 | ;;------------------------------------------------------------------------------ | 3183 | ;;------------------------------------------------------------------------------ |
| 3160 | 3184 | ||
| @@ -3202,6 +3226,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3202 | :version "24.1" | 3226 | :version "24.1" |
| 3203 | :group 'rst-faces | 3227 | :group 'rst-faces |
| 3204 | :type '(face)) | 3228 | :type '(face)) |
| 3229 | (rst-testcover-defcustom) | ||
| 3205 | (make-obsolete-variable 'rst-block-face | 3230 | (make-obsolete-variable 'rst-block-face |
| 3206 | "customize the face `rst-block' instead." | 3231 | "customize the face `rst-block' instead." |
| 3207 | "24.1") | 3232 | "24.1") |
| @@ -3216,6 +3241,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3216 | :version "24.1" | 3241 | :version "24.1" |
| 3217 | :group 'rst-faces | 3242 | :group 'rst-faces |
| 3218 | :type '(face)) | 3243 | :type '(face)) |
| 3244 | (rst-testcover-defcustom) | ||
| 3219 | (make-obsolete-variable 'rst-external-face | 3245 | (make-obsolete-variable 'rst-external-face |
| 3220 | "customize the face `rst-external' instead." | 3246 | "customize the face `rst-external' instead." |
| 3221 | "24.1") | 3247 | "24.1") |
| @@ -3230,6 +3256,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3230 | :version "24.1" | 3256 | :version "24.1" |
| 3231 | :group 'rst-faces | 3257 | :group 'rst-faces |
| 3232 | :type '(face)) | 3258 | :type '(face)) |
| 3259 | (rst-testcover-defcustom) | ||
| 3233 | (make-obsolete-variable 'rst-definition-face | 3260 | (make-obsolete-variable 'rst-definition-face |
| 3234 | "customize the face `rst-definition' instead." | 3261 | "customize the face `rst-definition' instead." |
| 3235 | "24.1") | 3262 | "24.1") |
| @@ -3246,6 +3273,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3246 | "Directives and roles." | 3273 | "Directives and roles." |
| 3247 | :group 'rst-faces | 3274 | :group 'rst-faces |
| 3248 | :type '(face)) | 3275 | :type '(face)) |
| 3276 | (rst-testcover-defcustom) | ||
| 3249 | (make-obsolete-variable 'rst-directive-face | 3277 | (make-obsolete-variable 'rst-directive-face |
| 3250 | "customize the face `rst-directive' instead." | 3278 | "customize the face `rst-directive' instead." |
| 3251 | "24.1") | 3279 | "24.1") |
| @@ -3260,6 +3288,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3260 | :version "24.1" | 3288 | :version "24.1" |
| 3261 | :group 'rst-faces | 3289 | :group 'rst-faces |
| 3262 | :type '(face)) | 3290 | :type '(face)) |
| 3291 | (rst-testcover-defcustom) | ||
| 3263 | (make-obsolete-variable 'rst-comment-face | 3292 | (make-obsolete-variable 'rst-comment-face |
| 3264 | "customize the face `rst-comment' instead." | 3293 | "customize the face `rst-comment' instead." |
| 3265 | "24.1") | 3294 | "24.1") |
| @@ -3274,6 +3303,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3274 | :version "24.1" | 3303 | :version "24.1" |
| 3275 | :group 'rst-faces | 3304 | :group 'rst-faces |
| 3276 | :type '(face)) | 3305 | :type '(face)) |
| 3306 | (rst-testcover-defcustom) | ||
| 3277 | (make-obsolete-variable 'rst-emphasis1-face | 3307 | (make-obsolete-variable 'rst-emphasis1-face |
| 3278 | "customize the face `rst-emphasis1' instead." | 3308 | "customize the face `rst-emphasis1' instead." |
| 3279 | "24.1") | 3309 | "24.1") |
| @@ -3287,6 +3317,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3287 | "Double emphasis." | 3317 | "Double emphasis." |
| 3288 | :group 'rst-faces | 3318 | :group 'rst-faces |
| 3289 | :type '(face)) | 3319 | :type '(face)) |
| 3320 | (rst-testcover-defcustom) | ||
| 3290 | (make-obsolete-variable 'rst-emphasis2-face | 3321 | (make-obsolete-variable 'rst-emphasis2-face |
| 3291 | "customize the face `rst-emphasis2' instead." | 3322 | "customize the face `rst-emphasis2' instead." |
| 3292 | "24.1") | 3323 | "24.1") |
| @@ -3301,6 +3332,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3301 | :version "24.1" | 3332 | :version "24.1" |
| 3302 | :group 'rst-faces | 3333 | :group 'rst-faces |
| 3303 | :type '(face)) | 3334 | :type '(face)) |
| 3335 | (rst-testcover-defcustom) | ||
| 3304 | (make-obsolete-variable 'rst-literal-face | 3336 | (make-obsolete-variable 'rst-literal-face |
| 3305 | "customize the face `rst-literal' instead." | 3337 | "customize the face `rst-literal' instead." |
| 3306 | "24.1") | 3338 | "24.1") |
| @@ -3315,6 +3347,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too." | |||
| 3315 | :version "24.1" | 3347 | :version "24.1" |
| 3316 | :group 'rst-faces | 3348 | :group 'rst-faces |
| 3317 | :type '(face)) | 3349 | :type '(face)) |
| 3350 | (rst-testcover-defcustom) | ||
| 3318 | (make-obsolete-variable 'rst-reference-face | 3351 | (make-obsolete-variable 'rst-reference-face |
| 3319 | "customize the face `rst-reference' instead." | 3352 | "customize the face `rst-reference' instead." |
| 3320 | "24.1") | 3353 | "24.1") |
| @@ -3368,6 +3401,7 @@ Recompute the faces. VAL is the value to set." | |||
| 3368 | :group 'rst-faces-defaults | 3401 | :group 'rst-faces-defaults |
| 3369 | :type '(integer) | 3402 | :type '(integer) |
| 3370 | :set 'rst-set-level-default) | 3403 | :set 'rst-set-level-default) |
| 3404 | (rst-testcover-defcustom) | ||
| 3371 | ;; FIXME: It should be possible to give "#RRGGBB" type of color values. | 3405 | ;; FIXME: It should be possible to give "#RRGGBB" type of color values. |
| 3372 | ;; Together with a `rst-level-face-end-light' this could be used for | 3406 | ;; Together with a `rst-level-face-end-light' this could be used for |
| 3373 | ;; computing steps. | 3407 | ;; computing steps. |
| @@ -3378,6 +3412,7 @@ Recompute the faces. VAL is the value to set." | |||
| 3378 | :group 'rst-faces-defaults | 3412 | :group 'rst-faces-defaults |
| 3379 | :type '(string) | 3413 | :type '(string) |
| 3380 | :set 'rst-set-level-default) | 3414 | :set 'rst-set-level-default) |
| 3415 | (rst-testcover-defcustom) | ||
| 3381 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify | 3416 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify |
| 3382 | ;; how they behave for dark and light background using the | 3417 | ;; how they behave for dark and light background using the |
| 3383 | ;; relevant options explained in `defface'. | 3418 | ;; relevant options explained in `defface'. |
| @@ -3391,12 +3426,14 @@ The default depends on whether the value of `frame-background-mode' is | |||
| 3391 | :group 'rst-faces-defaults | 3426 | :group 'rst-faces-defaults |
| 3392 | :type '(integer) | 3427 | :type '(integer) |
| 3393 | :set 'rst-set-level-default) | 3428 | :set 'rst-set-level-default) |
| 3429 | (rst-testcover-defcustom) | ||
| 3394 | (defcustom rst-level-face-format-light "%2d" | 3430 | (defcustom rst-level-face-format-light "%2d" |
| 3395 | "The format for the lightness factor appended to the base name of the color. | 3431 | "The format for the lightness factor appended to the base name of the color. |
| 3396 | This value is expanded by `format' with an integer." | 3432 | This value is expanded by `format' with an integer." |
| 3397 | :group 'rst-faces-defaults | 3433 | :group 'rst-faces-defaults |
| 3398 | :type '(string) | 3434 | :type '(string) |
| 3399 | :set 'rst-set-level-default) | 3435 | :set 'rst-set-level-default) |
| 3436 | (rst-testcover-defcustom) | ||
| 3400 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify | 3437 | ;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify |
| 3401 | ;; how they behave for dark and light background using the | 3438 | ;; how they behave for dark and light background using the |
| 3402 | ;; relevant options explained in `defface'. | 3439 | ;; relevant options explained in `defface'. |
| @@ -3420,6 +3457,7 @@ This color is used as background for section title text on level | |||
| 3420 | :group 'rst-faces-defaults | 3457 | :group 'rst-faces-defaults |
| 3421 | :type '(integer) | 3458 | :type '(integer) |
| 3422 | :set 'rst-set-level-default) | 3459 | :set 'rst-set-level-default) |
| 3460 | (rst-testcover-defcustom) | ||
| 3423 | 3461 | ||
| 3424 | (defcustom rst-adornment-faces-alist | 3462 | (defcustom rst-adornment-faces-alist |
| 3425 | ;; FIXME LEVEL-FACE: Must be redone if `rst-level-face-max' is changed | 3463 | ;; FIXME LEVEL-FACE: Must be redone if `rst-level-face-max' is changed |
| @@ -3447,6 +3485,7 @@ group." | |||
| 3447 | (const :tag "section title adornment" nil)) | 3485 | (const :tag "section title adornment" nil)) |
| 3448 | :value-type (face)) | 3486 | :value-type (face)) |
| 3449 | :set-after '(rst-level-face-max)) | 3487 | :set-after '(rst-level-face-max)) |
| 3488 | (rst-testcover-defcustom) | ||
| 3450 | 3489 | ||
| 3451 | (defun rst-define-level-faces () | 3490 | (defun rst-define-level-faces () |
| 3452 | "Define the faces for the section title text faces from the values." | 3491 | "Define the faces for the section title text faces from the values." |
| @@ -3663,8 +3702,7 @@ variable of the `rst-faces-defaults' group is customized. Use | |||
| 3663 | ;; Indentation is not required for doctest blocks. | 3702 | ;; Indentation is not required for doctest blocks. |
| 3664 | (,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+")) | 3703 | (,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+")) |
| 3665 | (1 rst-block-face) | 3704 | (1 rst-block-face) |
| 3666 | (2 rst-literal-face)) | 3705 | (2 rst-literal-face))) |
| 3667 | ) | ||
| 3668 | "Keywords to highlight in rst mode.") | 3706 | "Keywords to highlight in rst mode.") |
| 3669 | 3707 | ||
| 3670 | (defvar font-lock-beg) | 3708 | (defvar font-lock-beg) |
| @@ -3974,6 +4012,7 @@ string)) to be used for converting the document." | |||
| 3974 | (string :tag "Options")))) | 4012 | (string :tag "Options")))) |
| 3975 | :group 'rst | 4013 | :group 'rst |
| 3976 | :package-version "1.2.0") | 4014 | :package-version "1.2.0") |
| 4015 | (rst-testcover-defcustom) | ||
| 3977 | 4016 | ||
| 3978 | ;; FIXME: Must be `defcustom`. | 4017 | ;; FIXME: Must be `defcustom`. |
| 3979 | (defvar rst-compile-primary-toolset 'html | 4018 | (defvar rst-compile-primary-toolset 'html |
| @@ -3999,11 +4038,8 @@ string)) to be used for converting the document." | |||
| 3999 | (setq prevdir dir) | 4038 | (setq prevdir dir) |
| 4000 | (setq dir (expand-file-name (file-name-directory | 4039 | (setq dir (expand-file-name (file-name-directory |
| 4001 | (directory-file-name | 4040 | (directory-file-name |
| 4002 | (file-name-directory dir))))) | 4041 | (file-name-directory dir)))))) |
| 4003 | ) | 4042 | (or (and dir (concat dir file-name)) nil)))) |
| 4004 | (or (and dir (concat dir file-name)) nil) | ||
| 4005 | ))) | ||
| 4006 | |||
| 4007 | 4043 | ||
| 4008 | (require 'compile) | 4044 | (require 'compile) |
| 4009 | 4045 | ||
| @@ -4041,8 +4077,7 @@ select the alternative tool-set." | |||
| 4041 | ;; Invoke the compile command. | 4077 | ;; Invoke the compile command. |
| 4042 | (if (or compilation-read-command use-alt) | 4078 | (if (or compilation-read-command use-alt) |
| 4043 | (call-interactively 'compile) | 4079 | (call-interactively 'compile) |
| 4044 | (compile compile-command)) | 4080 | (compile compile-command)))) |
| 4045 | )) | ||
| 4046 | 4081 | ||
| 4047 | (defun rst-compile-alt-toolset () | 4082 | (defun rst-compile-alt-toolset () |
| 4048 | "Compile command with the alternative tool-set." | 4083 | "Compile command with the alternative tool-set." |
| @@ -4166,8 +4201,7 @@ column is used (fill-column vs. end of previous/next line)." | |||
| 4166 | (cond ((equal last-command 'rst-repeat-last-character) | 4201 | (cond ((equal last-command 'rst-repeat-last-character) |
| 4167 | (if (= curcol fill-column) prevcol fill-column)) | 4202 | (if (= curcol fill-column) prevcol fill-column)) |
| 4168 | (t (save-excursion | 4203 | (t (save-excursion |
| 4169 | (if (zerop prevcol) fill-column prevcol))) | 4204 | (if (zerop prevcol) fill-column prevcol)))))) |
| 4170 | )) ) | ||
| 4171 | (end-of-line) | 4205 | (end-of-line) |
| 4172 | (if (> (current-column) rightmost-column) | 4206 | (if (> (current-column) rightmost-column) |
| 4173 | ;; Shave characters off the end. | 4207 | ;; Shave characters off the end. |
| @@ -4176,17 +4210,7 @@ column is used (fill-column vs. end of previous/next line)." | |||
| 4176 | (point)) | 4210 | (point)) |
| 4177 | ;; Fill with last characters. | 4211 | ;; Fill with last characters. |
| 4178 | (insert-char (preceding-char) | 4212 | (insert-char (preceding-char) |
| 4179 | (- rightmost-column (current-column)))) | 4213 | (- rightmost-column (current-column)))))) |
| 4180 | )) | ||
| 4181 | |||
| 4182 | |||
| 4183 | (defun rst-portable-mark-active-p () | ||
| 4184 | "Return non-nil if the mark is active. | ||
| 4185 | This is a portable function." | ||
| 4186 | (cond | ||
| 4187 | ((fboundp 'region-active-p) (region-active-p)) | ||
| 4188 | ((boundp 'transient-mark-mode) (and transient-mark-mode mark-active)) | ||
| 4189 | (t mark-active))) | ||
| 4190 | 4214 | ||
| 4191 | 4215 | ||
| 4192 | 4216 | ||
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 5bcd87ede68..67d7f8c01f9 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -451,7 +451,7 @@ the next N words. In Transient Mark mode, when the mark is active, | |||
| 451 | N defaults to -1, which means to wrap it around the current region. | 451 | N defaults to -1, which means to wrap it around the current region. |
| 452 | 452 | ||
| 453 | If you like upcased tags, put (setq sgml-transformation-function 'upcase) | 453 | If you like upcased tags, put (setq sgml-transformation-function 'upcase) |
| 454 | in your `.emacs' file. | 454 | in your init file. |
| 455 | 455 | ||
| 456 | Use \\[sgml-validate] to validate your document with an SGML parser. | 456 | Use \\[sgml-validate] to validate your document with an SGML parser. |
| 457 | 457 | ||
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 2664a89855f..459e884d45d 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el | |||
| @@ -126,7 +126,7 @@ | |||
| 126 | ;; again. | 126 | ;; again. |
| 127 | ;; | 127 | ;; |
| 128 | ;; To use the package regularly place this file in the site library | 128 | ;; To use the package regularly place this file in the site library |
| 129 | ;; directory and add the next expression in your .emacs file. Make | 129 | ;; directory and add the next expression in your init file. Make |
| 130 | ;; sure that directory is included in the `load-path'. | 130 | ;; sure that directory is included in the `load-path'. |
| 131 | ;; | 131 | ;; |
| 132 | ;; (require 'table) | 132 | ;; (require 'table) |
| @@ -342,10 +342,10 @@ | |||
| 342 | ;; (function (lambda () | 342 | ;; (function (lambda () |
| 343 | ;; (local-set-key [<key sequence>] '<function>)))) | 343 | ;; (local-set-key [<key sequence>] '<function>)))) |
| 344 | ;; | 344 | ;; |
| 345 | ;; Above code is well known ~/.emacs idiom for customizing a mode | 345 | ;; Adding the above to your init file is a common way to customize a |
| 346 | ;; specific keymap however it does not work for this package. This is | 346 | ;; mode specific keymap. However it does not work for this package. |
| 347 | ;; because there is no table mode in effect. This package does not | 347 | ;; This is because there is no table mode in effect. This package |
| 348 | ;; use a local map therefore you must modify `table-cell-map' | 348 | ;; does not use a local map therefore you must modify `table-cell-map' |
| 349 | ;; explicitly. The correct way of achieving above task is: | 349 | ;; explicitly. The correct way of achieving above task is: |
| 350 | ;; | 350 | ;; |
| 351 | ;; (add-hook 'table-cell-map-hook | 351 | ;; (add-hook 'table-cell-map-hook |
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 8a4fe4f87fd..b21e72639fd 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el | |||
| @@ -276,8 +276,9 @@ You have the following commands at your disposal: | |||
| 276 | \\[2C-merge] Merge both buffers | 276 | \\[2C-merge] Merge both buffers |
| 277 | \\[2C-dissociate] Dissociate the two buffers | 277 | \\[2C-dissociate] Dissociate the two buffers |
| 278 | 278 | ||
| 279 | These keybindings can be customized in your ~/.emacs by `2C-mode-map', | 279 | These keybindings can be customized in your init file by |
| 280 | `2C-minor-mode-map' and by binding `2C-command' to some prefix. | 280 | `2C-mode-map', `2C-minor-mode-map' and by binding `2C-command' to |
| 281 | some prefix. | ||
| 281 | 282 | ||
| 282 | The appearance of the screen can be customized by the variables | 283 | The appearance of the screen can be customized by the variables |
| 283 | `2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and | 284 | `2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and |
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index 13963121e2b..c2ac1035dfe 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; | 29 | ;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; |
| 30 | ;; See the top of `time-stamp.el' for another example. | 30 | ;; See the top of `time-stamp.el' for another example. |
| 31 | 31 | ||
| 32 | ;; To use time-stamping, add this line to your .emacs file: | 32 | ;; To use time-stamping, add this line to your init file: |
| 33 | ;; (add-hook 'before-save-hook 'time-stamp) | 33 | ;; (add-hook 'before-save-hook 'time-stamp) |
| 34 | ;; Now any time-stamp templates in your files will be updated automatically. | 34 | ;; Now any time-stamp templates in your files will be updated automatically. |
| 35 | 35 | ||
| @@ -254,7 +254,7 @@ time-stamped file itself.") | |||
| 254 | (defun time-stamp () | 254 | (defun time-stamp () |
| 255 | "Update the time stamp string(s) in the buffer. | 255 | "Update the time stamp string(s) in the buffer. |
| 256 | A template in a file can be automatically updated with a new time stamp | 256 | A template in a file can be automatically updated with a new time stamp |
| 257 | every time you save the file. Add this line to your .emacs file: | 257 | every time you save the file. Add this line to your init file: |
| 258 | (add-hook 'before-save-hook 'time-stamp) | 258 | (add-hook 'before-save-hook 'time-stamp) |
| 259 | or customize `before-save-hook' through Custom. | 259 | or customize `before-save-hook' through Custom. |
| 260 | Normally the template must appear in the first 8 lines of a file and | 260 | Normally the template must appear in the first 8 lines of a file and |
diff --git a/lisp/time.el b/lisp/time.el index 8d43b565416..fe3cdbb57be 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -575,7 +575,8 @@ To turn off the world time display, go to that window and type `q'." | |||
| 575 | (let ((list timer-list)) | 575 | (let ((list timer-list)) |
| 576 | (while list | 576 | (while list |
| 577 | (let ((elt (pop list))) | 577 | (let ((elt (pop list))) |
| 578 | (when (equal (symbol-name (aref elt 5)) "display-time-world-timer") | 578 | (when (equal (symbol-name (timer--function elt)) |
| 579 | "display-time-world-timer") | ||
| 579 | (cancel-timer elt))))))) | 580 | (cancel-timer elt))))))) |
| 580 | 581 | ||
| 581 | ;;;###autoload | 582 | ;;;###autoload |
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index bd7d8e33922..26fe72014f7 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | 79 | ||
| 80 | ;; Store any proxying information - this will not overwrite an old | 80 | ;; Store any proxying information - this will not overwrite an old |
| 81 | ;; entry, so that people can still set this information in their | 81 | ;; entry, so that people can still set this information in their |
| 82 | ;; .emacs file | 82 | ;; init file |
| 83 | (cond | 83 | (cond |
| 84 | (cur-proxy nil) ; Keep their old settings | 84 | (cur-proxy nil) ; Keep their old settings |
| 85 | ((null env-proxy) nil) ; No proxy setup | 85 | ((null env-proxy) nil) ; No proxy setup |
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el index 0f71b7b82e7..fc65d62c67d 100644 --- a/lisp/vc/pcvs-defs.el +++ b/lisp/vc/pcvs-defs.el | |||
| @@ -57,11 +57,7 @@ versions, such as the one in SunOS-4.") | |||
| 57 | ;;;; END OF THINGS TO CHECK WHEN INSTALLING | 57 | ;;;; END OF THINGS TO CHECK WHEN INSTALLING |
| 58 | ;;;; -------------------------------------------------------- | 58 | ;;;; -------------------------------------------------------- |
| 59 | 59 | ||
| 60 | ;;;; | ||
| 61 | ;;;; User configuration variables: | 60 | ;;;; User configuration variables: |
| 62 | ;;;; | ||
| 63 | ;;;; NOTE: these should be set in your ~/.emacs (or site-lisp/default.el) file. | ||
| 64 | ;;;; | ||
| 65 | 61 | ||
| 66 | (defgroup pcl-cvs nil | 62 | (defgroup pcl-cvs nil |
| 67 | "Special support for the CVS versioning system." | 63 | "Special support for the CVS versioning system." |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index c0dafda57b6..1eb33776f6a 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -534,7 +534,9 @@ in the branch repository (or whose status not be determined)." | |||
| 534 | ;; FIXME: maybe it's overkill to check if both these | 534 | ;; FIXME: maybe it's overkill to check if both these |
| 535 | ;; files exist. | 535 | ;; files exist. |
| 536 | (and (file-exists-p branch-format-file) | 536 | (and (file-exists-p branch-format-file) |
| 537 | (file-exists-p lastrev-file))))) | 537 | (file-exists-p lastrev-file) |
| 538 | (equal (emacs-bzr-version-dirstate l-c-parent-dir) | ||
| 539 | (emacs-bzr-version-dirstate rootdir)))))) | ||
| 538 | t))) | 540 | t))) |
| 539 | (with-temp-buffer | 541 | (with-temp-buffer |
| 540 | (insert-file-contents branch-format-file) | 542 | (insert-file-contents branch-format-file) |
| @@ -553,13 +555,17 @@ in the branch repository (or whose status not be determined)." | |||
| 553 | (insert-file-contents lastrev-file) | 555 | (insert-file-contents lastrev-file) |
| 554 | (when (re-search-forward "[0-9]+" nil t) | 556 | (when (re-search-forward "[0-9]+" nil t) |
| 555 | (buffer-substring (match-beginning 0) (match-end 0)))))) | 557 | (buffer-substring (match-beginning 0) (match-end 0)))))) |
| 556 | ;; fallback to calling "bzr revno" | 558 | ;; Fallback to calling "bzr revno --tree". |
| 559 | ;; The "--tree" matters for lightweight checkouts not on the same | ||
| 560 | ;; revision as the parent. | ||
| 557 | (let* ((result (vc-bzr-command-discarding-stderr | 561 | (let* ((result (vc-bzr-command-discarding-stderr |
| 558 | vc-bzr-program "revno" (file-relative-name file))) | 562 | vc-bzr-program "revno" "--tree" |
| 563 | (file-relative-name file))) | ||
| 559 | (exitcode (car result)) | 564 | (exitcode (car result)) |
| 560 | (output (cdr result))) | 565 | (output (cdr result))) |
| 561 | (cond | 566 | (cond |
| 562 | ((eq exitcode 0) (substring output 0 -1)) | 567 | ((and (eq exitcode 0) (not (zerop (length output)))) |
| 568 | (substring output 0 -1)) | ||
| 563 | (t nil)))))) | 569 | (t nil)))))) |
| 564 | 570 | ||
| 565 | (defun vc-bzr-create-repo () | 571 | (defun vc-bzr-create-repo () |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b48ea1afd95..ea9ce949ccb 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | ;; To install: put this file on the load-path and add Git to the list | 32 | ;; To install: put this file on the load-path and add Git to the list |
| 33 | ;; of supported backends in `vc-handled-backends'; the following line, | 33 | ;; of supported backends in `vc-handled-backends'; the following line, |
| 34 | ;; placed in your ~/.emacs, will accomplish this: | 34 | ;; placed in your init file, will accomplish this: |
| 35 | ;; | 35 | ;; |
| 36 | ;; (add-to-list 'vc-handled-backends 'Git) | 36 | ;; (add-to-list 'vc-handled-backends 'Git) |
| 37 | 37 | ||
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1ef4faaa008..47800bd4aac 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -653,7 +653,6 @@ | |||
| 653 | 653 | ||
| 654 | (require 'vc-hooks) | 654 | (require 'vc-hooks) |
| 655 | (require 'vc-dispatcher) | 655 | (require 'vc-dispatcher) |
| 656 | (require 'ediff) | ||
| 657 | 656 | ||
| 658 | (declare-function diff-setup-whitespace "diff-mode" ()) | 657 | (declare-function diff-setup-whitespace "diff-mode" ()) |
| 659 | 658 | ||
| @@ -1698,7 +1697,9 @@ saving the buffer." | |||
| 1698 | (vc-diff-internal t (vc-deduce-fileset t) nil nil | 1697 | (vc-diff-internal t (vc-deduce-fileset t) nil nil |
| 1699 | (called-interactively-p 'interactive)))) | 1698 | (called-interactively-p 'interactive)))) |
| 1700 | 1699 | ||
| 1701 | (declare-function ediff-vc-internal (rev1 rev2 &optional startup-hooks)) | 1700 | (declare-function ediff-load-version-control "ediff" (&optional silent)) |
| 1701 | (declare-function ediff-vc-internal "ediff-vers" | ||
| 1702 | (rev1 rev2 &optional startup-hooks)) | ||
| 1702 | 1703 | ||
| 1703 | ;;;###autoload | 1704 | ;;;###autoload |
| 1704 | (defun vc-version-ediff (files rev1 rev2) | 1705 | (defun vc-version-ediff (files rev1 rev2) |
| @@ -1719,7 +1720,8 @@ repository history using ediff." | |||
| 1719 | ;; FIXME We only support running ediff on one file for now. | 1720 | ;; FIXME We only support running ediff on one file for now. |
| 1720 | ;; We could spin off an ediff session per file in the file set. | 1721 | ;; We could spin off an ediff session per file in the file set. |
| 1721 | ((= (length files) 1) | 1722 | ((= (length files) 1) |
| 1722 | (ediff-load-version-control) | 1723 | (require 'ediff) |
| 1724 | (ediff-load-version-control) ; loads ediff-vers | ||
| 1723 | (find-file (car files)) ;FIXME: find-file from Elisp is bad. | 1725 | (find-file (car files)) ;FIXME: find-file from Elisp is bad. |
| 1724 | (ediff-vc-internal rev1 rev2 nil)) | 1726 | (ediff-vc-internal rev1 rev2 nil)) |
| 1725 | (t | 1727 | (t |
diff --git a/lisp/version.el b/lisp/version.el index e63c51d0d26..1fb3828e15d 100644 --- a/lisp/version.el +++ b/lisp/version.el | |||
| @@ -87,40 +87,91 @@ to the system configuration; look at `system-configuration' instead." | |||
| 87 | ;; Set during dumping, this is a defvar so that it can be setq'd. | 87 | ;; Set during dumping, this is a defvar so that it can be setq'd. |
| 88 | (defvar emacs-bzr-version nil | 88 | (defvar emacs-bzr-version nil |
| 89 | "String giving the bzr revision from which this Emacs was built. | 89 | "String giving the bzr revision from which this Emacs was built. |
| 90 | Value is the bzr revision number and a revision ID separated by a blank. | 90 | The format is: [revno] revision_id, where revno may be absent. |
| 91 | Value is nil if Emacs was not built from a bzr checkout, or if we could | 91 | Value is nil if Emacs was not built from a bzr checkout, or if we could |
| 92 | not determine the revision.") | 92 | not determine the revision.") |
| 93 | 93 | ||
| 94 | (defun emacs-bzr-get-version (&optional dir) | 94 | (defun emacs-bzr-version-dirstate (dir) |
| 95 | "Try to return as a string the bzr revision number of the Emacs sources. | 95 | "Try to return as a string the bzr revision ID of directory DIR. |
| 96 | Value is the bzr revision number and a revision ID separated by a blank. | 96 | This uses the dirstate file's parent revision entry. |
| 97 | Returns nil if unable to find this information." | ||
| 98 | (let ((file (expand-file-name ".bzr/checkout/dirstate" dir))) | ||
| 99 | (when (file-readable-p file) | ||
| 100 | (with-temp-buffer | ||
| 101 | (insert-file-contents file) | ||
| 102 | (and (looking-at "#bazaar dirstate flat format 3") | ||
| 103 | (forward-line 3) | ||
| 104 | (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") | ||
| 105 | (match-string 1)))))) | ||
| 106 | |||
| 107 | (defun emacs-bzr-version-bzr (dir) | ||
| 108 | "Ask bzr itself for the version information for directory DIR." | ||
| 109 | ;; Comments on `bzr version-info': | ||
| 110 | ;; i) Unknown files also cause clean != 1. | ||
| 111 | ;; ii) It can be slow, contacting the upstream repo to get the | ||
| 112 | ;; branch nick if one is not set locally, even with a custom | ||
| 113 | ;; template that is not asking for the nick (as used here). You'd | ||
| 114 | ;; think the latter part would be trivial to fix: | ||
| 115 | ;; https://bugs.launchpad.net/bzr/+bug/882541/comments/3 | ||
| 116 | ;; https://bugs.launchpad.net/bzr/+bug/629150 | ||
| 117 | ;; You can set the nick locally with `bzr nick ...', which speeds | ||
| 118 | ;; things up enormously. `bzr revno' does not have this issue, but | ||
| 119 | ;; has no way to print the revision_id AFAICS. | ||
| 120 | (message "Waiting for bzr...") | ||
| 121 | (with-temp-buffer | ||
| 122 | (if (zerop | ||
| 123 | (call-process "bzr" nil '(t nil) nil "version-info" | ||
| 124 | "--custom" | ||
| 125 | "--template={revno} {revision_id} (clean = {clean})" | ||
| 126 | "dir")) | ||
| 127 | (buffer-string)))) | ||
| 128 | |||
| 129 | (defun emacs-bzr-get-version (&optional dir external) | ||
| 130 | "Try to return as a string the bzr revision of the Emacs sources. | ||
| 131 | The format is: [revno] revision_id, where revno may be absent. | ||
| 97 | Value is nil if the sources do not seem to be under bzr, or if we could | 132 | Value is nil if the sources do not seem to be under bzr, or if we could |
| 98 | not determine the revision. Note that this reports on the current state | 133 | not determine the revision. Note that this reports on the current state |
| 99 | of the sources, which may not correspond to the running Emacs. | 134 | of the sources, which may not correspond to the running Emacs. |
| 100 | 135 | ||
| 101 | Optional argument DIR is a directory to use instead of `source-directory'." | 136 | Optional argument DIR is a directory to use instead of `source-directory'. |
| 137 | Optional argument EXTERNAL non-nil means to maybe ask `bzr' itself, | ||
| 138 | if the sources appear to be under bzr. If `force', always ask bzr. | ||
| 139 | Otherwise only ask bzr if we cannot find any information ourselves." | ||
| 102 | (or dir (setq dir source-directory)) | 140 | (or dir (setq dir source-directory)) |
| 103 | (when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir))) | 141 | (when (file-directory-p (expand-file-name ".bzr/branch" dir)) |
| 104 | (let (file loc) | 142 | (if (eq external 'force) |
| 105 | (cond ((file-readable-p | 143 | (emacs-bzr-version-bzr dir) |
| 106 | (setq file (expand-file-name "last-revision" dir))) | 144 | (let (file loc rev) |
| 107 | (with-temp-buffer | 145 | (cond ((file-readable-p |
| 108 | (insert-file-contents file) | 146 | (setq file (expand-file-name ".bzr/branch/last-revision" dir))) |
| 109 | (goto-char (point-max)) | 147 | (with-temp-buffer |
| 110 | (if (looking-back "\n") | 148 | (insert-file-contents file) |
| 111 | (delete-char -1)) | 149 | (goto-char (point-max)) |
| 112 | (buffer-string))) | 150 | (if (looking-back "\n") |
| 113 | ;; OK, no last-revision. Is it a lightweight checkout? | 151 | (delete-char -1)) |
| 114 | ((file-readable-p | 152 | (buffer-string))) |
| 115 | (setq file (expand-file-name "location" dir))) | 153 | ;; OK, no last-revision. Is it a lightweight checkout? |
| 116 | ;; If the parent branch is local, try looking there for the revid. | 154 | ((file-readable-p |
| 117 | (if (setq loc (with-temp-buffer | 155 | (setq file (expand-file-name ".bzr/branch/location" dir))) |
| 118 | (insert-file-contents file) | 156 | (setq rev (emacs-bzr-version-dirstate dir)) |
| 119 | (if (looking-at "file://\\(.*\\)") | 157 | ;; If the parent branch is local, try looking there for the rev. |
| 120 | (match-string 1)))) | 158 | ;; Note: there is no guarantee that the parent branch's rev |
| 121 | (emacs-bzr-get-version loc))) | 159 | ;; corresponds to this branch. This branch could have |
| 122 | ;; Could fall back to eg `bzr testament' at this point. | 160 | ;; been made with a specific -r revno argument, or the |
| 123 | )))) | 161 | ;; parent could have been updated since this branch was created. |
| 162 | ;; To try and detect this, we check the dirstate revids | ||
| 163 | ;; to see if they match. | ||
| 164 | (if (and (setq loc (with-temp-buffer | ||
| 165 | (insert-file-contents file) | ||
| 166 | (if (looking-at "file://\\(.*\\)") | ||
| 167 | (match-string 1)))) | ||
| 168 | (equal rev (emacs-bzr-version-dirstate loc))) | ||
| 169 | (emacs-bzr-get-version loc) | ||
| 170 | ;; If parent does not match, the best we can do without | ||
| 171 | ;; calling external commands is to use the dirstate rev. | ||
| 172 | rev)) | ||
| 173 | (external | ||
| 174 | (emacs-bzr-version-bzr dir))))))) | ||
| 124 | 175 | ||
| 125 | ;; We put version info into the executable in the form that `ident' uses. | 176 | ;; We put version info into the executable in the form that `ident' uses. |
| 126 | (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) | 177 | (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) |
diff --git a/lisp/windmove.el b/lisp/windmove.el index 3a1afec38ee..1181e409dff 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -94,7 +94,7 @@ | |||
| 94 | 94 | ||
| 95 | ;; Installation: | 95 | ;; Installation: |
| 96 | ;; | 96 | ;; |
| 97 | ;; Put the following line in your `.emacs' file: | 97 | ;; Put the following line in your init file: |
| 98 | ;; | 98 | ;; |
| 99 | ;; (windmove-default-keybindings) ; shifted arrow keys | 99 | ;; (windmove-default-keybindings) ; shifted arrow keys |
| 100 | ;; | 100 | ;; |
diff --git a/lisp/window.el b/lisp/window.el index dd1f55450c3..fccb68bd94a 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -4551,6 +4551,9 @@ of the window used." | |||
| 4551 | (function :tag "function")) | 4551 | (function :tag "function")) |
| 4552 | :group 'windows) | 4552 | :group 'windows) |
| 4553 | 4553 | ||
| 4554 | (make-obsolete-variable 'display-buffer-function | ||
| 4555 | 'display-buffer-alist "24.3") | ||
| 4556 | |||
| 4554 | ;; Eventually, we want to turn this into a defvar; instead of | 4557 | ;; Eventually, we want to turn this into a defvar; instead of |
| 4555 | ;; customizing this, the user should use a `pop-up-frame-parameters' | 4558 | ;; customizing this, the user should use a `pop-up-frame-parameters' |
| 4556 | ;; alist entry in `display-buffer-base-action'. | 4559 | ;; alist entry in `display-buffer-base-action'. |
| @@ -4768,8 +4771,8 @@ the selected window. If they contain (same-frame . t), display | |||
| 4768 | BUFFER in a window of the selected frame. | 4771 | BUFFER in a window of the selected frame. |
| 4769 | 4772 | ||
| 4770 | If ARGS is a list whose car is a symbol, use (car ARGS) as a | 4773 | If ARGS is a list whose car is a symbol, use (car ARGS) as a |
| 4771 | function to do the work. Pass it BUFFER as first argument, | 4774 | function to do the work. Pass it BUFFER as first argument, and |
| 4772 | and (cdr ARGS) as second." | 4775 | pass the elements of (cdr ARGS) as the remaining arguments." |
| 4773 | (if (and args (symbolp (car args))) | 4776 | (if (and args (symbolp (car args))) |
| 4774 | (apply (car args) buffer (cdr args)) | 4777 | (apply (car args) buffer (cdr args)) |
| 4775 | (let ((window (get-buffer-window buffer 0))) | 4778 | (let ((window (get-buffer-window buffer 0))) |