aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJim Blandy <[email protected]>1992-06-30 13:54:21 +0000
committerJim Blandy <[email protected]>1992-06-30 13:54:21 +0000
commite5d77022e8429ca757746ed5d7cf9e2420703e8e (patch)
tree2e273d216c8f9e34d5e29547f8e7e7c6c5d32049 /lisp
parent53b0a6f88893036a42db2abcfbc257b68906956e (diff)
*** empty log message ***
Diffstat (limited to 'lisp')
-rw-r--r--lisp/abbrev.el1
-rw-r--r--lisp/calendar/calendar.el229
-rw-r--r--lisp/calendar/holidays.el8
-rw-r--r--lisp/completion.el4
-rw-r--r--lisp/diary-lib.el59
-rw-r--r--lisp/emacs-lisp/autoload.el2
-rw-r--r--lisp/help.el3
-rw-r--r--lisp/indent.el1
-rw-r--r--lisp/info.el4
-rw-r--r--lisp/isearch-old.el22
-rw-r--r--lisp/progmodes/compile.el5
-rw-r--r--lisp/replace.el28
-rw-r--r--lisp/textmodes/fill.el2
-rw-r--r--lisp/textmodes/paragraphs.el5
-rw-r--r--lisp/textmodes/texnfo-upd.el12
15 files changed, 230 insertions, 155 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index ba159233bc..3cbeb19391 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -19,7 +19,6 @@
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;###autoload
(defconst only-global-abbrevs nil "\
*t means user plans to use global abbrevs only.
Makes the commands to define mode-specific abbrevs define global ones instead.")
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 1e3fbd3194..6eca77808c 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1,6 +1,5 @@
;;; calendar.el --- Calendar functions.
-
-;; Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
+;;; Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -67,7 +66,7 @@
;; Software--Practice and Experience, Volume 20, Number 9 (September, 1990),
;; pages 899-928.
-(defconst calendar-version "Version 4.01, released August 20, 1991")
+(defconst calendar-version "Version 4.02, released June 14, 1992")
(defvar view-diary-entries-initially nil
"*If T, the diary entries for the current date will be displayed on entry.
@@ -102,6 +101,7 @@ The marking symbol is specified by the variable `diary-entry-marker'.")
on entry. The holidays are displayed in another window when the calendar is
first displayed.")
+;;;###autoload
(defvar mark-holidays-in-calendar nil
"*If t, dates of holidays will be marked in the calendar window.
The marking symbol is specified by the variable `calendar-holiday-marker'.")
@@ -109,18 +109,21 @@ The marking symbol is specified by the variable `calendar-holiday-marker'.")
(defvar calendar-holiday-marker "*"
"*The symbol used to mark notable dates in the calendar.")
+;;;###autoload
(defvar all-hebrew-calendar-holidays nil
"*If nil, the holidays from the Hebrew calendar that are shown will
include only those days of such major interest as to appear on secular
calendars. If t, the holidays shown in the calendar will include all
special days that would be shown on a complete Hebrew calendar.")
+;;;###autoload
(defvar all-christian-calendar-holidays nil
"*If nil, the holidays from the Christian calendar that are shown will
include only those days of such major interest as to appear on secular
calendars. If t, the holidays shown in the calendar will include all
special days that would be shown on a complete Christian calendar.")
+;;;###autoload
(defvar all-islamic-calendar-holidays nil
"*If nil, the holidays from the Islamic calendar that are shown will
include only those days of such major interest as to appear on secular
@@ -401,6 +404,7 @@ include, for example, rearranging the lines into order by day and time,
saving the buffer instead of deleting it, or changing the function used to
do the printing.")
+;;;###autoload
(defvar list-diary-entries-hook nil
"*List of functions to be called after the diary file is culled for
relevant entries. It is to be used for diary entries that are not found in
@@ -432,6 +436,7 @@ in your .emacs file to cause the fancy diary buffer to be displayed with
diary entries from various included files, each day's entries sorted into
lexicographic order.")
+;;;###autoload
(defvar diary-display-hook 'simple-diary-display
"*List of functions that handle the display of the diary.
@@ -453,6 +458,7 @@ diary buffer will not show days for which there are no diary entries, even
if that day is a holiday; if you want such days to be shown in the fancy
diary buffer, set the variable `diary-list-include-blanks' to t.")
+;;;###autoload
(defvar nongregorian-diary-listing-hook nil
"*List of functions to be called for the diary file and included files as
they are processed for listing diary entries. You can use any or all of
@@ -474,12 +480,14 @@ variable `diary-include-string'. When you use `mark-included-diary-files' as
part of the mark-diary-entries-hook, you will probably also want to use the
function `include-other-diary-files' as part of the list-diary-entries-hook.")
+;;;###autoload
(defvar nongregorian-diary-marking-hook nil
"*List of functions to be called as the diary file and included files are
processed for marking diary entries. You can use either or both of
mark-hebrew-diary-entries and mark-islamic-diary-entries. The documentation
for these functions describes the style of such diary entries.")
+;;;###autoload
(defvar diary-list-include-blanks nil
"*If nil, do not include days with no diary entry in the list of diary
entries. Such days will then not be shown in the the fancy diary buffer,
@@ -693,7 +701,6 @@ the inclusion of the functions `calendar-holiday-function-fixed',
`calendar-holiday-function-islamic', `calendar-holiday-function-julian',
and `calendar-holiday-function-if', respectively.")
-
(defconst calendar-buffer "*Calendar*"
"Name of the buffer used for the calendar.")
@@ -726,6 +733,37 @@ sum EXPRESSION."
(setq (, index) (1+ (, index))))
sum)))
+;; The following macros are for speed; the code would be clearer if they
+;; were functions, but they can be called thousands of times when
+;; looking up holidays or processing the diary. Here, for example, are the
+;; numbers of calls to calendar/diary/holiday functions in preparing the
+;; fancy diary display, for a moderately complex diary file, with functions
+;; used instead of macros. There were a total of 10000 such calls:
+;;
+;; 1934 extract-calendar-month
+;; 1852 extract-calendar-year
+;; 1819 extract-calendar-day
+;; 845 calendar-leap-year-p
+;; 837 calendar-day-number
+;; 775 calendar-absolute-from-gregorian
+;; 346 calendar-last-day-of-month
+;; 286 hebrew-calendar-last-day-of-month
+;; 188 hebrew-calendar-leap-year-p
+;; 180 hebrew-calendar-elapsed-days
+;; 163 hebrew-calendar-last-month-of-year
+;; 66 calendar-date-compare
+;; 65 hebrew-calendar-days-in-year
+;; 60 calendar-absolute-from-julian
+;; 50 calendar-absolute-from-hebrew
+;; 43 calendar-date-equal
+;; 38 calendar-gregorian-from-absolute
+;; .
+;; .
+;; .
+;;
+;; The use of these seven macros eliminates the overhead of 92% of the function
+;; calls; it's faster this way.
+
(defmacro extract-calendar-month (date)
"Extract the month part of DATE which has the form (month day year)."
(` (car (, date))))
@@ -738,6 +776,52 @@ sum EXPRESSION."
"Extract the year part of DATE which has the form (month day year)."
(` (car (cdr (cdr (, date))))))
+(defmacro calendar-leap-year-p (year)
+ "Returns t if YEAR is a Gregorian leap year."
+ (` (or
+ (and (= (% (, year) 4) 0)
+ (/= (% (, year) 100) 0))
+ (= (% (, year) 400) 0))))
+
+(defmacro calendar-last-day-of-month (month year)
+ "The last day in MONTH during YEAR."
+ (` (if (and
+ (, (macroexpand (` (calendar-leap-year-p (, year)))))
+ (= (, month) 2))
+ 29
+ (aref [31 28 31 30 31 30 31 31 30 31 30 31] (1- (, month))))))
+
+(defmacro calendar-day-number (date)
+ "Return the day number within the year of the date DATE.
+For example, (calendar-day-number '(1 1 1987)) returns the value 1,
+while (calendar-day-number '(12 31 1980)) returns 366."
+;;
+;; An explanation of the calculation can be found in PascAlgorithms by
+;; Edward and Ruth Reingold, Scott-Foresman/Little, Brown, 1988.
+;;
+ (` (let* ((month (, (macroexpand (` (extract-calendar-month (, date))))))
+ (day (, (macroexpand (` (extract-calendar-day (, date))))))
+ (year (, (macroexpand (` (extract-calendar-year (, date))))))
+ (day-of-year (+ day (* 31 (1- month)))))
+ (if (> month 2)
+ (progn
+ (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10)))
+ (if (, (macroexpand (` (calendar-leap-year-p year))))
+ (setq day-of-year (1+ day-of-year)))))
+ day-of-year)))
+
+(defmacro calendar-absolute-from-gregorian (date)
+ "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE.
+The Gregorian date Sunday, December 31, 1 BC is imaginary."
+ (` (let ((month (, (macroexpand (` (extract-calendar-month (, date))))))
+ (day (, (macroexpand (` (extract-calendar-day (, date))))))
+ (year (, (macroexpand (` (extract-calendar-year (, date)))))))
+ (+ (, (macroexpand (` (calendar-day-number (, date)))));; Days this year
+ (* 365 (1- year));; + Days in prior years
+ (/ (1- year) 4);; + Julian leap years
+ (- (/ (1- year) 100));; - century years
+ (/ (1- year) 400)))));; + Gregorian leap years
+
;;;###autoload
(defun calendar (&optional arg)
"Display a three-month calendar in another window.
@@ -944,10 +1028,11 @@ from the first character on the line and does not disturb the first INDENT
characters on the line."
(let* ((first-day-of-month (calendar-day-of-week (list month 1 year)))
(first-saturday (- 7 first-day-of-month))
- (last (calendar-last-day-of-month month year)))
+ (last (calendar-last-day-of-month month year))
+ (heading (format "%s %d" (calendar-month-name month) year)))
(goto-char (point-min))
(calendar-insert-indented
- (format " %s %d" (calendar-month-name month) year) indent t)
+ heading (+ indent (/ (- 20 (length heading)) 2)) t)
(calendar-insert-indented " S M Tu W Th F S" indent t)
(calendar-insert-indented "" indent);; Move to appropriate spot on line
;; Add blank days before the first of the month
@@ -1902,32 +1987,6 @@ is a string to insert in the minibuffer before reading."
(+ (* 12 (- yr2 yr1))
(- mon2 mon1)))
-(defun calendar-leap-year-p (year)
- "Returns t if YEAR is a Gregorian leap year."
- (or
- (and (= (% year 4) 0)
- (/= (% year 100) 0))
- (= (% year 400) 0)))
-
-(defun calendar-day-number (date)
- "Return the day number within the year of the date DATE.
-For example, (calendar-day-number '(1 1 1987)) returns the value 1,
-while (calendar-day-number '(12 31 1980)) returns 366."
-;;
-;; An explanation of the calculation can be found in PascAlgorithms by
-;; Edward and Ruth Reingold, Scott-Foresman/Little, Brown, 1988.
-;;
- (let* ((month (extract-calendar-month date))
- (day (extract-calendar-day date))
- (year (extract-calendar-year date))
- (day-of-year (+ day (* 31 (1- month)))))
- (if (> month 2)
- (progn
- (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10)))
- (if (calendar-leap-year-p year)
- (setq day-of-year (1+ day-of-year)))))
- day-of-year))
-
(defun calendar-day-name (date)
"Returns a string with the name of the day of the week of DATE."
(aref calendar-day-name-array (calendar-day-of-week date)))
@@ -1935,12 +1994,6 @@ while (calendar-day-number '(12 31 1980)) returns 366."
(defconst calendar-day-name-array
["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"])
-(defun calendar-last-day-of-month (month year)
- "The last day in MONTH during YEAR."
- (if (and (calendar-leap-year-p year) (= month 2))
- 29
- (aref [31 28 31 30 31 30 31 31 30 31 30 31] (1- month))))
-
(defconst calendar-month-name-array
["January" "February" "March" "April" "May" "June"
"July" "August" "September" "October" "November" "December"])
@@ -1965,18 +2018,6 @@ If FILTER is provided, apply it to each item in the list."
"Returns the day-of-the-week index of DATE, 0 for Sunday, 1 for Monday, etc."
(% (calendar-absolute-from-gregorian date) 7))
-(defun calendar-absolute-from-gregorian (date)
- "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE.
-The Gregorian date Sunday, December 31, 1 BC is imaginary."
- (let ((month (extract-calendar-month date))
- (day (extract-calendar-day date))
- (year (extract-calendar-year date)))
- (+ (calendar-day-number date);; Days this year
- (* 365 (1- year));; + Days in prior years
- (/ (1- year) 4);; + Julian leap years
- (- (/ (1- year) 100));; - century years
- (/ (1- year) 400))));; + Gregorian leap years
-
(defun calendar-unmark ()
"Delete the diary and holiday marks from the calendar."
(interactive)
@@ -2459,6 +2500,94 @@ Gregorian date Sunday, December 31, 1 BC."
calendar-hebrew-month-name-array-common-year)))
(message "Hebrew date: %s" (calendar-date-string hebrew-date nil t))))
+(defun hebrew-calendar-yahrzeit (death-date year)
+ "Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR."
+ (let* ((death-day (extract-calendar-day death-date))
+ (death-month (extract-calendar-month death-date))
+ (death-year (extract-calendar-year death-date)))
+ (cond
+ ;; If it's Heshvan 30 it depends on the first anniversary; if
+ ;; that was not Heshvan 30, use the day before Kislev 1.
+ ((and (= death-month 8)
+ (= death-day 30)
+ (not (hebrew-calendar-long-heshvan-p (1+ death-year))))
+ (1- (calendar-absolute-from-hebrew (list 9 1 year))))
+ ;; If it's Kislev 30 it depends on the first anniversary; if
+ ;; that was not Kislev 30, use the day before Teveth 1.
+ ((and (= death-month 9)
+ (= death-day 30)
+ (hebrew-calendar-short-kislev-p (1+ death-year)))
+ (1- (calendar-absolute-from-hebrew (list 10 1 year))))
+ ;; If it's Adar II, use the same day in last month of
+ ;; year (Adar or Adar II).
+ ((= death-month 13)
+ (calendar-absolute-from-hebrew
+ (list (last-month-of-hebrew-year year) death-day year)))
+ ;; If it's the 30th in Adar I and $year$ is not a leap year
+ ;; (so Adar has only 29 days), use the last day in Shevat.
+ ((and (= death-day 30)
+ (= death-month 12)
+ (not (hebrew-calendar-leap-year-p death-year)))
+ (calendar-absolute-from-hebrew (list 11 30 year)))
+ ;; In all other cases, use the normal anniversary of the date of death.
+ (t (calendar-absolute-from-hebrew
+ (list death-month death-day year))))))
+
+(defun list-yahrzeit-dates (death-date start-year end-year)
+ "List of Yahrzeit dates for *Gregorian* DEATH-DATE
+from START-YEAR to END-YEAR. When called interactively
+the date of death is taken from the cursor in the calendar window."
+ (interactive
+ (let* ((death-date (calendar-cursor-to-date))
+ (death-year (extract-calendar-year death-date))
+ (start-year (calendar-read
+ (format "Starting year of Yahrzeit table (>%d): "
+ death-year)
+ '(lambda (x) (> x death-year))
+ (int-to-string (1+ death-year))))
+ (end-year (calendar-read
+ (format "Ending year of Yahrzeit table (>=%d): "
+ start-year)
+ '(lambda (x) (>= x start-year)))))
+ (list death-date start-year end-year)))
+ (message "Computing yahrzeits...")
+ (let* ((yahrzeit-buffer "*Yahrzeits*")
+ (h-date (calendar-hebrew-from-absolute
+ (calendar-absolute-from-gregorian death-date)))
+ (h-month (extract-calendar-month h-date))
+ (h-day (extract-calendar-day h-date))
+ (h-year (extract-calendar-year h-date)))
+ (set-buffer (get-buffer-create yahrzeit-buffer))
+ (setq buffer-read-only nil)
+ (setq mode-line-format
+ (format "------Yahrzeit dates for %s = %s%%-"
+ (calendar-date-string death-date)
+ (let ((calendar-month-name-array
+ (if (hebrew-calendar-leap-year-p h-year)
+ calendar-hebrew-month-name-array-leap-year
+ calendar-hebrew-month-name-array-common-year))
+ (calendar-date-display-form
+ (if european-calendar-style
+ '(day " " monthname " " year)
+ '(monthname " " day ", " year))))
+ (calendar-date-string h-date nil t))))
+ (erase-buffer)
+ (goto-char (point-min))
+ (calendar-for-loop i from start-year to end-year do
+ (insert
+ (calendar-date-string
+ (calendar-gregorian-from-absolute
+ (hebrew-calendar-yahrzeit
+ h-date
+ (extract-calendar-year
+ (calendar-hebrew-from-absolute
+ (calendar-absolute-from-gregorian (list 1 1 i))))))) "\n"))
+ (goto-char (point-min))
+ (set-buffer-modified-p nil)
+ (setq buffer-read-only t)
+ (display-buffer yahrzeit-buffer)
+ (message "Computing yahrzeits...done")))
+
(defun french-calendar-leap-year-p (year)
"True if YEAR is a leap year on the French Revolutionary calendar.
For Gregorian years 1793 to 1805, the years of actual operation of the
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 437be3c5ab..4f3c0daf7b 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -1,6 +1,5 @@
;;; holidays.el --- holiday functions for the calendar package
-
-;; Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc.
+;;; Copyright (C) 1989, 1990 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -34,6 +33,8 @@
;; pages 899-928.
(require 'calendar)
+
+;;;###autoload
(defun holidays ()
"Display the holidays for last month, this month, and next month.
This function is suitable for execution in a .emacs file."
@@ -62,7 +63,8 @@ The holidays are those in the list calendar-holidays."
"Find holidays for the date specified by the cursor in the calendar window."
(interactive)
(message "Checking holidays...")
- (let* ((date (calendar-cursor-to-date))
+ (let* ((date (or (calendar-cursor-to-date)
+ (error "Cursor is not on a date!")))
(date-string (calendar-date-string date))
(holiday-list (check-calendar-holidays date))
(holiday-string (mapconcat 'identity holiday-list "; "))
diff --git a/lisp/completion.el b/lisp/completion.el
index 6ae62aa8a6..c62673649b 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -2834,8 +2834,8 @@ Patched to remove the most recent completion."
(use-completion-before-separator)
(self-insert-command arg)
(and (> (current-column) fill-column)
- auto-fill-hook
- (funcall auto-fill-hook))
+ auto-fill-function
+ (funcall auto-fill-function))
)
;;;-----------------------------------------------
diff --git a/lisp/diary-lib.el b/lisp/diary-lib.el
index 83e22d52aa..b28836ce11 100644
--- a/lisp/diary-lib.el
+++ b/lisp/diary-lib.el
@@ -1,6 +1,5 @@
;;; diary.el --- diary functions.
-
-;; Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1990 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -29,6 +28,8 @@
;; Urbana, Illinois 61801
(require 'calendar)
+
+;;;###autoload
(defun diary (&optional arg)
"Generate the diary window for ARG days starting with the current date.
If no argument is provided, the number of days of diary entries is governed
@@ -1254,8 +1255,8 @@ ending of that number (that is, `st', `nd', `rd' or `th', as appropriate."
(defun diary-ordinal-suffix (n)
"Ordinal suffix for N. (That is, `st', `nd', `rd', or `th', as appropriate.)"
- (if (or (and (< 9 n) (< n 20))
- (memq (% n 10) '(4 5 6 7 8 9 0)))
+ (if (or (memq (% n 100) '(11 12 13))
+ (< 3 (% n 10)))
"th"
(aref ["th" "st" "nd" "rd"] (% n 10))))
@@ -1374,8 +1375,8 @@ order of the parameters is changed to DEATH-DAY, DEATH-MONTH, DEATH-YEAR."
(t "th"))))))
(defun diary-rosh-hodesh ()
- "Rosh Hodesh diary entry--entry applies if date is Rosh Hodesh or the
-Saturday before."
+ "Rosh Hodesh diary entry--entry applies if date is Rosh Hodesh, the day
+before, or the Saturday before."
(let* ((d (calendar-absolute-from-gregorian date))
(h-date (calendar-hebrew-from-absolute d))
(h-month (extract-calendar-month h-date))
@@ -1415,9 +1416,18 @@ Saturday before."
((and (< h-day 30) (> h-day 22) (= 30 last-day))
(format "Mevarhim Rosh Hodesh %s (%s-%s)"
(aref h-month-names h-month)
- (aref calendar-day-name-array (- 29 h-day))
+ (if (= h-day 29)
+ "tomorrow"
+ (aref calendar-day-name-array (- 29 h-day)))
(aref calendar-day-name-array
- (mod (- 30 h-day) 7)))))))))
+ (mod (- 30 h-day) 7)))))
+ (if (and (= h-day 29) (/= h-month 6))
+ (format "Erev Rosh Hodesh %s"
+ (aref h-month-names
+ (if (= h-month
+ (hebrew-calendar-last-month-of-year
+ h-year))
+ 0 h-month))))))))
(defun diary-parasha ()
"Parasha diary entry--entry applies if date is a Saturday."
@@ -1606,39 +1616,6 @@ start on Tuesday.")
(aref hebrew-calendar-parashiot-names (aref p 1)))
(aref hebrew-calendar-parashiot-names p)))
-(defun hebrew-calendar-yahrzeit (death-date year)
- "Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR."
- (let* ((death-day (extract-calendar-day death-date))
- (death-month (extract-calendar-month death-date))
- (death-year (extract-calendar-year death-date)))
- (cond
- ;; If it's Heshvan 30 it depends on the first anniversary; if
- ;; that was not Heshvan 30, use the day before Kislev 1.
- ((and (= death-month 8)
- (= death-day 30)
- (not (hebrew-calendar-long-heshvan-p (1+ death-year))))
- (1- (calendar-absolute-from-hebrew (list 9 1 year))))
- ;; If it's Kislev 30 it depends on the first anniversary; if
- ;; that was not Kislev 30, use the day before Teveth 1.
- ((and (= death-month 9)
- (= death-day 30)
- (hebrew-calendar-short-kislev-p (1+ death-year)))
- (1- (calendar-absolute-from-hebrew (list 10 1 year))))
- ;; If it's Adar II, use the same day in last month of
- ;; year (Adar or Adar II).
- ((= death-month 13)
- (calendar-absolute-from-hebrew
- (list (last-month-of-hebrew-year year) death-day year)))
- ;; If it's the 30th in Adar I and $year$ is not a leap year
- ;; (so Adar has only 29 days), use the last day in Shevat.
- ((and (= death-day 30)
- (= death-month 12)
- (not (hebrew-calendar-leap-year-p death-year)))
- (calendar-absolute-from-hebrew (list 11 30 year)))
- ;; In all other cases, use the normal anniversary of the date of death.
- (t (calendar-absolute-from-hebrew
- (list death-month death-day year))))))
-
(defun list-islamic-diary-entries ()
"Add any Islamic date entries from the diary-file to diary-entries-list.
Islamic date diary entries must be prefaced by an islamic-diary-entry-symbol
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 767621adbd..c6916a3dd5 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -107,7 +107,7 @@ are used."
;; under a different path on another system,
;; `update-autoloads-here' won't be able to find the files to be
;; autoloaded. So, if FILE is in the same directory or a
- ;; subdirectory of the current buffer's file, we'll make it
+ ;; subdirectory of the current buffer's directory, we'll make it
;; relative to the current buffer's directory.
(setq file (expand-file-name file))
(if (and (< (length default-directory) (length file))
diff --git a/lisp/help.el b/lisp/help.el
index 48e3466573..91a947c99e 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -18,7 +18,6 @@
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;###autoload
(defvar help-map (make-sparse-keymap)
"Keymap for characters following the Help key.")
@@ -42,6 +41,8 @@
(define-key help-map "f" 'describe-function)
(define-key help-map "i" 'info)
+(define-key help-map "\C-f" 'Info-goto-emacs-command-node)
+(define-key help-map "\C-k" 'Info-goto-emacs-key-command-node)
(define-key help-map "l" 'view-lossage)
diff --git a/lisp/indent.el b/lisp/indent.el
index 76f16ac455..2990a5ae2d 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -19,7 +19,6 @@
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;###autoload
(defvar indent-line-function 'indent-to-left-margin "\
Function to indent current line.");Now in loaddefs.el
diff --git a/lisp/info.el b/lisp/info.el
index 7d0f0d61fe..a59bf013fc 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -978,8 +978,6 @@ The locations are of the format used in Info-history, i.e.
(if (> num-matches 2) "ies" "y")
(if (> num-matches 2) "them" "it"))))))
(error "Couldn't find documentation for %s." command))))
-;;;###autoload
-(define-key help-map "\C-f" 'Info-goto-emacs-command-node)
;;;###autoload
(defun Info-goto-emacs-key-command-node (key)
@@ -995,8 +993,6 @@ Interactively, if the binding is execute-extended-command, a command is read."
(read-command "Find documentation for command: ")))
(t
(Info-goto-emacs-command-node command)))))
-;;;###autoload
-(define-key help-map "\C-k" 'Info-goto-emacs-key-command-node)
(provide 'info)
diff --git a/lisp/isearch-old.el b/lisp/isearch-old.el
index 68dc943a73..265ea6b568 100644
--- a/lisp/isearch-old.el
+++ b/lisp/isearch-old.el
@@ -18,59 +18,45 @@
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;###autoload
(defvar search-last-string "" "\
Last string search for by a non-regexp search command.
This does not include direct calls to the primitive search functions,
and does not include searches that are aborted.")
-;;;###autoload
(defvar search-last-regexp "" "\
Last string searched for by a regexp search command.
This does not include direct calls to the primitive search functions,
and does not include searches that are aborted.")
-;;;###autoload
(defconst search-repeat-char ?\C-s "\
*Character to repeat incremental search forwards.")
-;;;###autoload
(defconst search-reverse-char ?\C-r "\
*Character to repeat incremental search backwards.")
-;;;###autoload
(defconst search-exit-char ?\C-m "\
*Character to exit incremental search.")
-;;;###autoload
(defconst search-delete-char ?\177 "\
*Character to delete from incremental search string.")
-;;;###autoload
(defconst search-quote-char ?\C-q "\
*Character to quote special characters for incremental search.")
-;;;###autoload
(defconst search-yank-word-char ?\C-w "\
*Character to pull next word from buffer into search string.")
-;;;###autoload
(defconst search-yank-line-char ?\C-y "\
*Character to pull rest of line from buffer into search string.")
-;;;###autoload
(defconst search-ring-advance-char ?\M-n "\
*Character to pull next (more recent) search string from the ring of same.")
-;;;###autoload
(defconst search-ring-retreat-char ?\M-p "\
*Character to pull previous (older) search string from the ring of same.")
-;;;###autoload
(defconst search-exit-option t "\
*Non-nil means random control characters terminate incremental search.")
-;;;###autoload
(defvar search-slow-window-lines 1 "\
*Number of lines in slow search display windows.
These are the short windows used during incremental search on slow terminals.
Negative means put the slow search window at the top (normally it's at bottom)
and the value is minus the number of lines.")
-;;;###autoload
(defvar search-slow-speed 1200 "\
*Highest terminal speed at which to use \"slow\" style incremental search.
This is the style where a one-line window is created to show the line
@@ -104,7 +90,6 @@ Each element is a cons cell of the form (STRING . UPPERCASE-FLAG).")
thing searched for.")
-;;;###autoload
(defun isearch-forward ()
"Do incremental search forward.
As you type characters, they add to the search string and are found.
@@ -123,36 +108,29 @@ C-g while searching or when search has failed
C-g when search is successful aborts and moves point to starting point."
(interactive)
(isearch t))
-;;;###autoload
(define-key global-map "\C-s" 'isearch-forward)
-;;;###autoload
(defun isearch-forward-regexp ()
"Do incremental search forward for regular expression.
Like ordinary incremental search except that your input
is treated as a regexp. See \\[isearch-forward] for more info."
(interactive)
(isearch t t))
-;;;###autoload
(define-key esc-map "\C-s" 'isearch-forward-regexp)
-;;;###autoload
(defun isearch-backward ()
"Do incremental search backward.
See \\[isearch-forward] for more information."
(interactive)
(isearch nil))
-;;;###autoload
(define-key global-map "\C-r" 'isearch-backward)
-;;;###autoload
(defun isearch-backward-regexp ()
"Do incremental search backward for regular expression.
Like ordinary incremental search except that your input
is treated as a regexp. See \\[isearch-forward] for more info."
(interactive)
(isearch nil t))
-;;;###autoload
(define-key esc-map "\C-r" 'isearch-backward-regexp)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index ac1be6b977..016b31b0bf 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -272,6 +272,7 @@ means the default). The defaults for these variables are the global values of
(set-buffer outbuf)
(compilation-mode)
(buffer-disable-undo (current-buffer))
+ (setq buffer-read-only t)
(set (make-local-variable 'compilation-parse-errors-function) parser)
(set (make-local-variable 'compilation-error-message) error-message)
(set (make-local-variable 'compilation-error-regexp-alist) regexp-alist)
@@ -343,6 +344,7 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)."
;; Write something in the compilation buffer
;; and hack its mode line.
(set-buffer buffer)
+ (setq buffer-read-only nil)
(setq omax (point-max)
opoint (point))
(goto-char omax)
@@ -360,7 +362,8 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)."
;; will stay around until M-x list-processes.
(delete-process proc))
;; Force mode line redisplay soon.
- (set-buffer-modified-p (buffer-modified-p)))
+ (set-buffer-modified-p (buffer-modified-p))
+ (setq buffer-read-only t))
(if (and opoint (< opoint omax))
(goto-char opoint))
(set-buffer obuf)
diff --git a/lisp/replace.el b/lisp/replace.el
index 6f8601dfd8..3dc2329521 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1,12 +1,12 @@
;;; replace.el --- replace commands for Emacs.
-;; Copyright (C) 1985-1991 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 86, 87, 88, 89, 90, 91, 92 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 1, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
@@ -19,11 +19,9 @@
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;###autoload
(defconst case-replace t "\
*Non-nil means query-replace should preserve case in replacements.")
-;;;###autoload
(defun query-replace (from-string to-string &optional arg)
"Replace some occurrences of FROM-STRING with TO-STRING.
As each match is found, the user must type a character saying
@@ -36,10 +34,8 @@ only matches surrounded by word boundaries."
(interactive "sQuery replace: \nsQuery replace %s with: \nP")
(perform-replace from-string to-string t nil arg)
(message "Done"))
-;;;###autoload
(define-key esc-map "%" 'query-replace)
-;;;###autoload
(defun query-replace-regexp (regexp to-string &optional arg)
"Replace some things after point matching REGEXP with TO-STRING.
As each match is found, the user must type a character saying
@@ -55,7 +51,6 @@ and \\=\\<n> means insert what matched <n>th \\(...\\) in REGEXP."
(perform-replace regexp to-string t t arg)
(message "Done"))
-;;;###autoload
(defun map-query-replace-regexp (regexp to-strings &optional arg)
"Replace some matches for REGEXP with various strings, in rotation.
The second argument TO-STRINGS contains the replacement strings, separated
@@ -84,7 +79,6 @@ before rotating to the next."
(perform-replace regexp replacements t t nil arg))
(message "Done"))
-;;;###autoload
(defun replace-string (from-string to-string &optional delimited)
"Replace occurrences of FROM-STRING with TO-STRING.
Preserve case in each match if `case-replace' and `case-fold-search'
@@ -101,7 +95,6 @@ which will run faster and will not set the mark or print anything."
(perform-replace from-string to-string nil nil delimited)
(message "Done"))
-;;;###autoload
(defun replace-regexp (regexp to-string &optional delimited)
"Replace things after point matching REGEXP with TO-STRING.
Preserve case in each match if case-replace and case-fold-search
@@ -348,7 +341,6 @@ C-l to clear the screen, redisplay, and offer same replacement again,
^ to move point back to previous match."
"Help message while in query-replace")
-;;;###autoload
(defun perform-replace (from-string replacements
query-flag regexp-flag delimited-flag
&optional repeat-count)
@@ -364,6 +356,7 @@ which will run faster and do exactly what you probably want."
(literal (not regexp-flag))
(search-function (if regexp-flag 're-search-forward 'search-forward))
(search-string from-string)
+ (real-match-data nil) ; the match data for the current match
(next-replacement nil)
(replacement-index 0)
(keep-going t)
@@ -400,6 +393,10 @@ which will run faster and do exactly what you probably want."
(forward-char 1)
(funcall search-function search-string nil t))
t))
+
+ ;; Save the data associated with the real match.
+ (setq real-match-data (match-data))
+
;; Before we make the replacement, decide whether the search string
;; can match again just after this match.
(if regexp-flag
@@ -414,15 +411,13 @@ which will run faster and do exactly what you probably want."
(setq replacement-index (% (1+ replacement-index) (length replacements)))))
(if (not query-flag)
(progn
+ (store-match-data real-match-data)
(replace-match next-replacement nocasify literal)
(setq replace-count (1+ replace-count)))
(undo-boundary)
(let (done replaced)
(while (not done)
- ;; Preserve the match data. Process filters and sentinels
- ;; could run inside read-char..
- (let ((data (match-data))
- (help-form
+ (let ((help-form
'(concat "Query replacing "
(if regexp-flag "regexp " "")
from-string " with " next-replacement ".\n\n"
@@ -432,8 +427,9 @@ which will run faster and do exactly what you probably want."
(message "Query replacing %s with %s: " from-string next-replacement)
(setq char (read-event))
(if (and (numberp char) (= char ??))
- (setq unread-command-char help-char char help-char)))
- (store-match-data data))
+ (setq unread-command-char help-char char help-char))))
+ ;; Restore the match data while we process the command.
+ (store-match-data real-match-data)
(cond ((or (= char ?\e)
(= char ?q))
(setq keep-going nil)
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 31626ccb0e..e4e02a68f6 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -321,4 +321,4 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
(fill-region-as-paragraph start (point) justifyp)
(or had-newline (delete-char -1))))))))
-;;; fill.el ends here \ No newline at end of file
+;;; fill.el ends here
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 2235c0b903..79a07781a3 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -19,25 +19,20 @@
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;###autoload
(defconst paragraph-start "^[ \t\n\f]" "\
*Regexp for beginning of a line that starts OR separates paragraphs.")
-;;;###autoload
(defconst paragraph-separate "^[ \t\f]*$" "\
*Regexp for beginning of a line that separates paragraphs.
If you change this, you may have to change paragraph-start also.")
-;;;###autoload
(defconst sentence-end (purecopy "[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") "\
*Regexp describing the end of a sentence.
All paragraph boundaries also end sentences, regardless.")
-;;;###autoload
(defconst page-delimiter "^\014" "\
*Regexp describing line-beginnings that separate pages.")
-;;;###autoload
(defvar paragraph-ignore-fill-prefix nil "\
Non-nil means the paragraph commands are not affected by `fill-prefix'.
This is desirable in modes where blank lines are the paragraph delimiters.")
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index 377de8a6ab..f089b090bb 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -2,13 +2,13 @@
;;;; Version 2.00 14 Dec 1990
-;;;; Copyright 1989, 1990 Free Software Foundation
+;;;; Copyright 1989, 1990, 1992 Free Software Foundation
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 1, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
@@ -1031,13 +1031,13 @@ which menu descriptions are indented. Its default value is 24."
(interactive "P")
(if (not region-p)
- (let ((auto-fill-hook nil)) ; update a single node
+ (let ((auto-fill-function nil)) ; update a single node
(if (not (re-search-backward "^@node" (point-min) t))
(error "Node line not found before this position."))
(texinfo-update-the-node)
(message "Done...updated the node. You may save the buffer."))
;; else
- (let ((auto-fill-hook nil)
+ (let ((auto-fill-function nil)
(beginning (region-beginning))
(end (region-end)))
(if (= end beginning)
@@ -1245,14 +1245,14 @@ Info `g*' command is inadequate."
(interactive "P")
(if (not region-p)
- (let ((auto-fill-hook nil)) ; update a single node
+ (let ((auto-fill-function nil)) ; update a single node
(if (not (re-search-backward "^@node" (point-min) t))
(error "Node line not found before this position."))
(texinfo-sequentially-update-the-node)
(message
"Done...sequentially updated the node . You may save the buffer."))
;; else
- (let ((auto-fill-hook nil)
+ (let ((auto-fill-function nil)
(beginning (region-beginning))
(end (region-end)))
(if (= end beginning)