diff options
| author | Jim Blandy | 1992-08-19 03:54:46 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-08-19 03:54:46 +0000 |
| commit | fbfed6f05fdf5bf363ca5691aefde4d573ce8203 (patch) | |
| tree | 726c22e6a55cb3e760a25f6aa60580d76c8de253 /lisp | |
| parent | 4d4c4e027fe376759227a6fb6b31a88be6e36347 (diff) | |
| download | emacs-fbfed6f05fdf5bf363ca5691aefde4d573ce8203.tar.gz emacs-fbfed6f05fdf5bf363ca5691aefde4d573ce8203.zip | |
entered into RCS
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/calendar/solar.el | 46 | ||||
| -rw-r--r-- | lisp/info.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/hideif.el | 4 | ||||
| -rw-r--r-- | lisp/sort.el | 33 | ||||
| -rw-r--r-- | lisp/timer.el | 6 |
5 files changed, 48 insertions, 43 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 6a6956ad81d..84b9dfe6ffb 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el | |||
| @@ -328,40 +328,40 @@ latitude, time zone, and date. | |||
| 328 | 328 | ||
| 329 | This function is suitable for execution in a .emacs file." | 329 | This function is suitable for execution in a .emacs file." |
| 330 | (interactive "p") | 330 | (interactive "p") |
| 331 | (if (< arg 16) | 331 | (if (and (< arg 16) |
| 332 | (if (not (and calendar-latitude calendar-longitude calendar-time-zone)) | 332 | (not (and calendar-latitude calendar-longitude calendar-time-zone))) |
| 333 | (solar-setup))) | 333 | (solar-setup)) |
| 334 | (let* ((calendar-longitude | 334 | (let* ((calendar-longitude |
| 335 | (if (< arg 16) | 335 | (if (< arg 16) calendar-longitude |
| 336 | calendar-longitude | ||
| 337 | (solar-get-number | 336 | (solar-get-number |
| 338 | "Enter longitude (decimal fraction; + east, - west): "))) | 337 | "Enter longitude (decimal fraction; + east, - west): "))) |
| 339 | (calendar-latitude | 338 | (calendar-latitude |
| 340 | (if (< arg 16) | 339 | (if (< arg 16) calendar-latitude |
| 341 | calendar-latitude | ||
| 342 | (solar-get-number | 340 | (solar-get-number |
| 343 | "Enter latitude (decimal fraction; + north, - south): "))) | 341 | "Enter latitude (decimal fraction; + north, - south): "))) |
| 344 | (calendar-time-zone | 342 | (calendar-time-zone |
| 345 | (if (< arg 16) | 343 | (if (< arg 16) calendar-time-zone |
| 346 | calendar-time-zone | ||
| 347 | (solar-get-number | 344 | (solar-get-number |
| 348 | "Enter difference from Universal Time (in minutes): "))) | 345 | "Enter difference from Universal Time (in minutes): "))) |
| 349 | (calendar-location-name | 346 | (calendar-location-name |
| 350 | (let ((float-output-format "%.1f")) | 347 | (if (< arg 16) calendar-location-name |
| 351 | (format "%s%s, %s%s" | 348 | (let ((float-output-format "%.1f")) |
| 352 | (abs calendar-latitude) | 349 | (format "%s%s, %s%s" |
| 353 | (if (> calendar-latitude 0) "N" "S") | 350 | (abs calendar-latitude) |
| 354 | (abs calendar-longitude) | 351 | (if (> calendar-latitude 0) "N" "S") |
| 355 | (if (> calendar-longitude 0) "E" "W")))) | 352 | (abs calendar-longitude) |
| 353 | (if (> calendar-longitude 0) "E" "W"))))) | ||
| 356 | (calendar-standard-time-zone-name | 354 | (calendar-standard-time-zone-name |
| 357 | (cond ((= calendar-time-zone 0) "UT") | 355 | (if (< arg 16) calendar-standard-time-zone-name |
| 358 | ((< calendar-time-zone 0) (format "UT%dmin" calendar-time-zone)) | 356 | (cond ((= calendar-time-zone 0) "UT") |
| 359 | (t (format "UT+%dmin" calendar-time-zone)))) | 357 | ((< calendar-time-zone 0) |
| 360 | (calendar-daylight-savings-starts nil) | 358 | (format "UT%dmin" calendar-time-zone)) |
| 361 | (calendar-daylight-savings-ends nil) | 359 | (t (format "UT+%dmin" calendar-time-zone))))) |
| 362 | (date (if (< arg 4) | 360 | (calendar-daylight-savings-starts |
| 363 | (calendar-current-date) | 361 | (if (< arg 16) calendar-daylight-savings-starts)) |
| 364 | (calendar-read-date))) | 362 | (calendar-daylight-savings-ends |
| 363 | (if (< arg 16) calendar-daylight-savings-ends)) | ||
| 364 | (date (if (< arg 4) (calendar-current-date) (calendar-read-date))) | ||
| 365 | (date-string (calendar-date-string date t)) | 365 | (date-string (calendar-date-string date t)) |
| 366 | (time-string (solar-sunrise-sunset date)) | 366 | (time-string (solar-sunrise-sunset date)) |
| 367 | (msg (format "%s: %s" date-string time-string)) | 367 | (msg (format "%s: %s" date-string time-string)) |
diff --git a/lisp/info.el b/lisp/info.el index a044aa77796..bf6dec805ea 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -179,7 +179,7 @@ to read a file name from the minibuffer." | |||
| 179 | (insert-buffer-substring buf) | 179 | (insert-buffer-substring buf) |
| 180 | (set-marker Info-tag-table-marker | 180 | (set-marker Info-tag-table-marker |
| 181 | (match-end 0)))) | 181 | (match-end 0)))) |
| 182 | (set-marker Info-tag-table-marker pos)))) | 182 | (set-marker Info-tag-table-marker pos)))) |
| 183 | (setq Info-current-file | 183 | (setq Info-current-file |
| 184 | (file-name-sans-versions buffer-file-name)))) | 184 | (file-name-sans-versions buffer-file-name)))) |
| 185 | (if (equal nodename "*") | 185 | (if (equal nodename "*") |
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 16178c018e2..5e6f9adbd5f 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el | |||
| @@ -198,6 +198,7 @@ before `hide-ifdef-mode' modifies it.") | |||
| 198 | (cons '(hide-ifdef-mode " Ifdef") | 198 | (cons '(hide-ifdef-mode " Ifdef") |
| 199 | minor-mode-alist))) | 199 | minor-mode-alist))) |
| 200 | 200 | ||
| 201 | ;;;###autoload | ||
| 201 | (defun hide-ifdef-mode (arg) | 202 | (defun hide-ifdef-mode (arg) |
| 202 | "Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. | 203 | "Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. |
| 203 | With ARG, turn Hide-Ifdef mode on iff arg is positive. | 204 | With ARG, turn Hide-Ifdef mode on iff arg is positive. |
| @@ -845,6 +846,7 @@ to redo on a recursive entry." | |||
| 845 | 846 | ||
| 846 | ;===%%SF%% exports (Start) === | 847 | ;===%%SF%% exports (Start) === |
| 847 | 848 | ||
| 849 | ;;;###autoload | ||
| 848 | (defvar hide-ifdef-initially nil | 850 | (defvar hide-ifdef-initially nil |
| 849 | "*Non-nil if `hide-ifdefs' should be called when Hide-Ifdef mode | 851 | "*Non-nil if `hide-ifdefs' should be called when Hide-Ifdef mode |
| 850 | is first activated.") | 852 | is first activated.") |
| @@ -852,12 +854,14 @@ is first activated.") | |||
| 852 | (defvar hide-ifdef-hiding nil | 854 | (defvar hide-ifdef-hiding nil |
| 853 | "Non-nil if text might be hidden.") | 855 | "Non-nil if text might be hidden.") |
| 854 | 856 | ||
| 857 | ;;;###autoload | ||
| 855 | (defvar hide-ifdef-read-only nil | 858 | (defvar hide-ifdef-read-only nil |
| 856 | "*Set to non-nil if you want buffer to be read-only while hiding text.") | 859 | "*Set to non-nil if you want buffer to be read-only while hiding text.") |
| 857 | 860 | ||
| 858 | (defvar hif-outside-read-only nil | 861 | (defvar hif-outside-read-only nil |
| 859 | "Internal variable. Saves the value of `buffer-read-only' while hiding.") | 862 | "Internal variable. Saves the value of `buffer-read-only' while hiding.") |
| 860 | 863 | ||
| 864 | ;;;###autoload | ||
| 861 | (defvar hide-ifdef-lines nil | 865 | (defvar hide-ifdef-lines nil |
| 862 | "*Set to t if you don't want to see the #ifX, #else, and #endif lines.") | 866 | "*Set to t if you don't want to see the #ifX, #else, and #endif lines.") |
| 863 | 867 | ||
diff --git a/lisp/sort.el b/lisp/sort.el index dd238d326e5..4405b6e77c0 100644 --- a/lisp/sort.el +++ b/lisp/sort.el | |||
| @@ -29,9 +29,10 @@ | |||
| 29 | Arguments are REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN. | 29 | Arguments are REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN. |
| 30 | 30 | ||
| 31 | We divide the accessible portion of the buffer into disjoint pieces | 31 | We divide the accessible portion of the buffer into disjoint pieces |
| 32 | called sort records. A portion of each sort record (perhaps all of it) | 32 | called sort records. A portion of each sort record (perhaps all of |
| 33 | is designated as the sort key. The records are rearranged in the buffer | 33 | it) is designated as the sort key. The records are rearranged in the |
| 34 | in order by their sort keys. The records may or may not be contiguous. | 34 | buffer in order by their sort keys. The records may or may not be |
| 35 | contiguous. | ||
| 35 | 36 | ||
| 36 | Usually the records are rearranged in order of ascending sort key. | 37 | Usually the records are rearranged in order of ascending sort key. |
| 37 | If REVERSE is non-nil, they are rearranged in order of descending sort key. | 38 | If REVERSE is non-nil, they are rearranged in order of descending sort key. |
| @@ -78,19 +79,19 @@ same as ENDRECFUN." | |||
| 78 | 'buffer-substring-lessp) | 79 | 'buffer-substring-lessp) |
| 79 | (t | 80 | (t |
| 80 | 'string<))) | 81 | 'string<))) |
| 81 | (sort sort-lists | 82 | (sort sort-lists |
| 82 | (cond ((numberp (car (car sort-lists))) | 83 | (cond ((numberp (car (car sort-lists))) |
| 83 | (function | 84 | (function |
| 84 | (lambda (a b) | 85 | (lambda (a b) |
| 85 | (< (car a) (car b))))) | 86 | (< (car a) (car b))))) |
| 86 | ((consp (car (car sort-lists))) | 87 | ((consp (car (car sort-lists))) |
| 87 | (function | 88 | (function |
| 88 | (lambda (a b) | 89 | (lambda (a b) |
| 89 | (buffer-substring-lessp (car a) (car b))))) | 90 | (buffer-substring-lessp (car a) (car b))))) |
| 90 | (t | 91 | (t |
| 91 | (function | 92 | (function |
| 92 | (lambda (a b) | 93 | (lambda (a b) |
| 93 | (string< (car a) (car b))))))))) | 94 | (string< (car a) (car b))))))))) |
| 94 | (if reverse (setq sort-lists (nreverse sort-lists))) | 95 | (if reverse (setq sort-lists (nreverse sort-lists))) |
| 95 | (if messages (message "Reordering buffer...")) | 96 | (if messages (message "Reordering buffer...")) |
| 96 | (sort-reorder-buffer sort-lists old))) | 97 | (sort-reorder-buffer sort-lists old))) |
diff --git a/lisp/timer.el b/lisp/timer.el index 128d32c7d30..bbd0db72742 100644 --- a/lisp/timer.el +++ b/lisp/timer.el | |||
| @@ -50,7 +50,7 @@ the call to the function." | |||
| 50 | (continue-process timer-process))) | 50 | (continue-process timer-process))) |
| 51 | ;; There should be a living, breathing timer process now | 51 | ;; There should be a living, breathing timer process now |
| 52 | (let ((token (concat (current-time-string) "-" (length timer-alist)))) | 52 | (let ((token (concat (current-time-string) "-" (length timer-alist)))) |
| 53 | (send-string timer-process (concat time "\001" token "\n")) | 53 | (send-string timer-process (concat time "@" token "\n")) |
| 54 | (setq timer-alist (cons (list token repeat function args) timer-alist)))) | 54 | (setq timer-alist (cons (list token repeat function args) timer-alist)))) |
| 55 | 55 | ||
| 56 | (defun timer-process-filter (proc str) | 56 | (defun timer-process-filter (proc str) |
| @@ -63,9 +63,9 @@ the call to the function." | |||
| 63 | (cond | 63 | (cond |
| 64 | (do (apply (nth 2 do) (nth 3 do)) ; do it | 64 | (do (apply (nth 2 do) (nth 3 do)) ; do it |
| 65 | (if (natnump (nth 1 do)) ; reschedule it | 65 | (if (natnump (nth 1 do)) ; reschedule it |
| 66 | (send-string proc (concat (nth 1 do) " sec\001" (car do) "\n")) | 66 | (send-string proc (concat (nth 1 do) " sec@" (car do) "\n")) |
| 67 | (setq timer-alist (delq do timer-alist)))) | 67 | (setq timer-alist (delq do timer-alist)))) |
| 68 | ((string-match "timer: \\([^:]+\\): \\([^\001]*\\)\001\\(.*\\)$" token) | 68 | ((string-match "timer: \\([^:]+\\): \\([^@]*\\)@\\(.*\\)$" token) |
| 69 | (setq error (substring token (match-beginning 1) (match-end 1)) | 69 | (setq error (substring token (match-beginning 1) (match-end 1)) |
| 70 | do (substring token (match-beginning 2) (match-end 2)) | 70 | do (substring token (match-beginning 2) (match-end 2)) |
| 71 | token (assoc (substring token (match-beginning 3) (match-end 3)) | 71 | token (assoc (substring token (match-beginning 3) (match-end 3)) |