- Timestamp:
- Jul 28, 1998, 5:54:04 PM (26 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 570ceaff67b8df5fad24bf67cfd38cecb8e5f413
- Parents:
- 73a5d17024f576058268b69583f17de25e4a6244
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/singular.el
r73a5d1 re2cd14 1 1 ;;; singular.el --- Emacs support for Computer Algebra System Singular 2 2 3 ;; $Id: singular.el,v 1. 8 1998-07-28 14:44:57schmidt Exp $3 ;; $Id: singular.el,v 1.9 1998-07-28 15:54:04 schmidt Exp $ 4 4 5 5 ;;; Commentary: … … 266 266 ;; Note: 267 267 ;; 268 ;; NOT READY[was sind und wollen simple sections]! 268 ;; Sections and simple sections are used to mark Singular's input and 269 ;; output for further access. Here are some general notes on simple 270 ;; sections. Sections are explained in the respective folding. 271 ;; 272 ;; In general, simple sections are more or less Emacs' overlays or XEmacs 273 ;; extents, resp. But they are more than simply an interface to overlays 274 ;; or sections. 275 ;; 276 ;; - Simple sections are non-empty portions of text. They are interpreted 277 ;; as left-closed, right-opened intervals, i.e., the start point of a 278 ;; simple sections belongs to it whereas the end point does not. 279 ;; - Simple sections start and end at line borders only. 280 ;; - Simple sections do not overlap. Thus, any point in the buffer may be 281 ;; covered by at most one simple section. 282 ;; - Besides from their start and their end, simple sections have some type 283 ;; associated. 284 ;; - Simple sections are realized using overlays (extents for XEmacs) 285 ;; which define the start and, end, and type (via properties) of the 286 ;; simple section. Actually, as a lisp object a simple section is 287 ;; nothing else but the underlying overlay. 288 ;; - There may be so-called clear simple sections. Clear simple sections 289 ;; have not an underlying overlay. Instead, they start at the end of the 290 ;; preceding non-clear simple section, end at the beginning of the next 291 ;; non-clear simple section, and have the type defined by 292 ;; `singular-simple-sec-clear-type'. Clear simple sections are 293 ;; represented by nil. 294 ;; - Buffer narrowing does not restrict the extent of completely or 295 ;; partially inaccessible simple sections. 296 ;; - After creation, simple sections are not modified any further. 297 ;; 298 ;; - In `singular-interactive-mode', the whole buffer is covered with 299 ;; simple sections from the very beginning of the file up to the 300 ;; beginning of the line containing the last input or output. The 301 ;; remaining text up to `(point-max)' may be interpreted as covered by 302 ;; one clear simple section. Thus, it is most reasonable to define 303 ;; `input' to be the type of clear simple sections. 269 304 270 305 (defvar singular-simple-sec-clear-type 'input … … 273 308 274 309 (defvar singular-simple-sec-last-end nil 275 "Marker at the end of the last simple section.") 310 "Marker at the end of the last simple section. 311 Should be initialized by `singular-simple-sec-init' before any calls to 312 `singular-simple-sec-create' are done.") 276 313 277 314 (defun singular-simple-sec-init (pos) … … 337 374 "Create a new simple section of type TYPE. 338 375 Creates the section from end of previous simple section up to END. 376 END should be larger than `singular-simple-sec-last-end'. 339 377 Returns the new simple section or `empty' if no simple section has 340 378 been created. … … 459 497 ;; Note: 460 498 ;; 461 ;; NOT READY[was sind und wollen sections im Gegensatz zu simple 462 ;; sections?]! 499 ;; Sections are built on simple sections. Their purpose is to cover the 500 ;; difference between clear and non-clear simple sections. 501 ;; 502 ;; - Sections consist of a simple section, its type, and its start and end 503 ;; points. This is redundant information only in the case of non-clear 504 ;; simple section. 505 ;; - Sections are read-only objects, neither are they modified nor are they 506 ;; created. 507 ;; - Sections are independent from implementation dependencies. There are 508 ;; no different versions of the functions for Emacs and XEmacs. 463 509 464 510 (defun singular-section-at (pos &optional restricted) … … 544 590 ;; `old-point-min'. This way, even partial narrowed sections are 545 591 ;; folded properly if they have been narrowed at bol. Nice but 546 ;; dirty trick. 592 ;; dirty trick: The insertion of a `?\r' at beginning of section 593 ;; advances the beginning of the restriction such that it displays 594 ;; the `?\r' immediately before bol. Seems worth it. 547 595 (old-point-min (point-min)) 548 596 (old-point-max (point-max-marker)))
Note: See TracChangeset
for help on using the changeset viewer.