Mercurial > emacs
view src/s/dgux4.h @ 68953:0ddd5b380ffb
Use allout invisible-text overlays instead of
selective display for concealed text. Also, lots of general
cleanup, and improved compatibility code.
(allout-version) Incremented, corrected, revised, and refined
module commentary.
(provide 'allout): Moved to the bottom, added a require of overlay.
(allout-encrypt-unencrypted-on-saves): Defaults to t instead of
`except-current'.
(allout-write-file-hook-handler): Minimize delay.
(count-trailing-whitespace-region): New function so
auto-encryption of current topic can resituate cursor exactly.
PGP/GPG encryption trims trailing whitespace from lines, which
must be accounted for across encryption then decryption.
(allout-command-prefix): Now defaults to "\C-c<space>" rather than
just plain "\C-c", to avoid intruding on user's keybinding space.
(allout-toggle-current-subtree-encryption): Pass along fetch-pass
parameter, so user request to provide a new password is done.
(allout-outside-normal-auto-fill-function, allout-auto-fill):
Refined mechanism for auto-filling behavior while in allout mode.
(allout-mode): Explicitly specify the mode map in the docstring.
Clarify provision for various write-file hook var names.
Adjusted for invisible-text overlays instead of selective-display.
(allout-depth): Really return 0 if not within any topic. This
rectifies `allout-beginning-of-level' and sequence numbering
errors that occur when cutting and pasting numbered topics.
Changed from a in-line subst to a regular function, as well.
(allout-pre-next-prefix): Renamed from allout-pre-next-preface.
(allout-end-of-subtree, allout-end-of-subtree)
(allout-end-of-entry, allout-end-of-current-heading)
(allout-next-visible-heading, allout-open-topic, allout-show-entry)
(allout-show-children, allout-show-to-offshoot)
(allout-hide-current-entry, allout-show-current-entry): Rectified
handling of trailing blank lines between items.
(allout-line-boundary-regexp, set-allout-regexp, allout-depth)
(allout-current-depth, allout-unprotected, allout-hidden-p)
(allout-on-current-heading-p, allout-listify-exposed)
(allout-chart-subtree, allout-goto-prefix)
(allout-back-to-current-heading, allout-get-body-text)
(allout-snug-back, allout-flag-current-subtree, allout-show-all)
(allout-hide-region-body, allout-toggle-subtree-encryption)
(allout-encrypt-string, allout-encrypted-key-info)
(allout-next-topic-pending-encryption, allout-encrypt-decrypted)
(allout-file-vars-section-data): Adjusted for use with
invisible-text overlays instead of selective-display.
(allout-kill-line, allout-kill-topic, allout-yank-processing):
Reworked for use with invisible text overlays.
(allout-current-topic-collapsed-p): New function.
(allout-hide-current-subtree): Use allout-current-topic-collapsed-p
to know when to close the containing topic.
(allout-pre-command-business, allout-post-command-business):
Simplify undo-batching and dynamic isearch exposure.
(allout-set-overlay-category): New for invisible-text overlays.
Sets properties of allout-overlay-category, used by
allout-flag-region to set invisible-text overlay properties.
(allout-get-invisibility-overlay): Get the first qualifying
invisibility overlay, so we can find the extent of it.
(allout-back-to-visible-text): Get to just before the beginnining
of the current invisibility overlay, if any.
(allout-overlay-insert-in-front-handler)
(allout-overlay-interior-modification-handler)
(allout-before-change-handler, allout-isearch-end-handler): New
functions to handle extraordinary actions affecting concealed
text.
(allout-flag-region): Use overlays instead of selective-display
for invisible text - by inheritence from the properties of
allout-overlay-category in mainline emacs, and applied
property-by-property in xemacs, some recent versions of which
don't inherit the properties from the category. Provisions to
respond to concealed-text edits simplified drastically.
(allout-isearch-rectification, allout-isearch-was-font-lock)
(allout-isearch-expose, allout-enwrap-isearch)
(allout-isearch-abort, allout-pre-was-isearching)
(allout-isearch-prior-pos, allout-isearch-did-quit)
(allout-isearch-dynamic-expose)
(allout-hide-current-entry-completely): Functions deleted.
(allout-undo-aggregation): Explicit undo aggregation no longer
necessary due to transition away from selective-display.
(set-allout-regexp, allout-up-current-level)
(allout-next-visible-heading, allout-forward-current-level)
(allout-open-topic, allout-reindent-body, allout-rebullet-topic)
(allout-kill-line, allout-yank-processing, allout-show-children)
(allout-expose-topic, allout-old-expose-topic)
(allout-listify-exposed, allout-insert-latex-header)
(allout-toggle-subtree-encryption, allout-encrypt-string)
(remove-from-invisibility-spec, allout-hide-current-subtree):
Ditched unused variables.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 17 Feb 2006 10:52:30 +0000 |
parents | 3bd95f4f2941 |
children | e90d04cd455a c5406394f567 |
line wrap: on
line source
/* Definitions file for GNU Emacs running on Data General's DG/UX Release 4.10 and above. Copyright (C) 1996, 2002, 2003, 2004, 2005, 2006 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 2, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file was written by Roderick Schertler <roderick@ibcinc.com>, contact me if you have problems with or comments about running Emacs on dgux. A number of things in the older dgux*.h files don't make sense to me, but since I'm relying on memory and I don't have any older dgux systems installed on which to test changes I'm undoing or fixing them here rather than fixing them at the source. */ /* In dgux.h it says "Can't use sys_signal because then etc/server.c would need sysdep.o." and then it #defines signal() to be berk_signal(), but emacsserver.c does `#undef signal' anyway, so that doesn't make sense. Further, sys_signal() in sysdep.c already had a special case for #ifdef DGUX, it called berk_signal() explicitly. I've removed that special case because it also didn't make sense: All versions of dgux which the dgux*.h headers take into account have POSIX signals (POSIX_SIGNALS is #defined in dgux.h). The comments in sys_signal() even acknowledged this (saying that the special berk_signal() case wasn't really necessary), they said that sys_signal() was using berk_signal() instead of sigaction() for efficiency. Since both give reliable signals neither has to be invoked within the handler. If the efficiency that the comments were talking about is the overhead of setting up the sigaction struct rather than just passing the function pointer in (which is the only efficiency I can think of) then that's a needless optimization, the Emacs sources do better without the special case. The following definition will prevent dgux.h from re-defining signal(). I can't just say `#undef signal' after including dgux.h because signal() is already a macro, defined in <sys/signal.h>, and the original definition would be lost. */ #define NO_DGUX_SIGNAL_REDEF #include "dgux5-4-3.h" #define LIBS_DEBUG /* nothing, -lg doesn't exist */ #define LIBS_SYSTEM -lsocket -lnsl #ifndef NOT_C_CODE /* dgux.h defines _setjmp() to be sigsetjmp(), but it defines _longjmp to be longjmp() rather than siglongjmp(). Further, it doesn't define jmp_buf, so sigsetjmp() is being called with a jmp_buf rather than a sigjmp_buf, and the buffer is then passed to vanilla longjmp(). This provides a more complete emulation of the Berkeley semantics. */ #include <setjmp.h> #undef jmp_buf #undef _setjmp #undef setjmp #undef _longjmp #undef longjmp #define jmp_buf sigjmp_buf #define _setjmp(env) sigsetjmp(env, 0) #define setjmp(env) sigsetjmp(env, 1) #define _longjmp siglongjmp #define longjmp siglongjmp /* The BAUD_CONVERT definition in dgux.h is wrong with this version of dgux, but I'm not sure when it changed. With the current system Emacs' standard handling of ospeed and baud_rate don't work. The baud values (B9600 and so on) returned by cfgetospeed() aren't compatible with those used by ospeed. speed_t, the type returned by cfgetospeed(), is unsigned long and speed_t values are large. Further, it isn't possible to get at both the SysV3 (ospeed) and POSIX (cfgetospeed()) values through symbolic constants simultaneously because they both use the same names (B9600). To get both baud_rate and ospeed right at the same time it's necessary to hardcode the values for one set of values, here I'm hardcoding ospeed. */ #undef BAUD_CONVERT #define INIT_BAUD_RATE() \ struct termios sg; \ \ tcgetattr (input_fd, &sg); \ switch (cfgetospeed (&sg)) { \ case B50: baud_rate = 50; ospeed = 0x1; break; \ case B75: baud_rate = 75; ospeed = 0x2; break; \ case B110: baud_rate = 110; ospeed = 0x3; break; \ case B134: baud_rate = 134; ospeed = 0x4; break; \ case B150: baud_rate = 150; ospeed = 0x5; break; \ case B200: baud_rate = 200; ospeed = 0x6; break; \ case B300: baud_rate = 300; ospeed = 0x7; break; \ case B600: baud_rate = 600; ospeed = 0x8; break; \ default: \ case B1200: baud_rate = 1200; ospeed = 0x9; break; \ case B1800: baud_rate = 1800; ospeed = 0xa; break; \ case B2400: baud_rate = 2400; ospeed = 0xb; break; \ case B4800: baud_rate = 4800; ospeed = 0xc; break; \ case B9600: baud_rate = 9600; ospeed = 0xd; break; \ case B19200: baud_rate = 19200; ospeed = 0xe; break; \ case B38400: baud_rate = 38400; ospeed = 0xf; break; \ } \ return; #if 0 /* Ehud Karni <ehud@unix.simonwiesel.co.il> says that the problem still exists on m88k-dg-dguxR4.11MU04 and i586-dg-dguxR4.11MU04. */ /* The `stop on tty output' problem which occurs when using INTERRUPT_INPUT and when Emacs is invoked under X11 using a job control shell (csh, ksh, etc.) in the background doesn't look to be present in R4.11. (At least, I can't reproduce it using jsh, csh, ksh or zsh.) */ #undef BROKEN_FIONREAD #define INTERRUPT_INPUT #endif /* 0 - never */ /* In R4.11 (or maybe R4.10, I don't have a system with that version loaded) some of the internal stdio semantics were changed. One I found while working on MH is that _cnt has to be 0 before _filbuf() is called. Another is that (_ptr - _base) doesn't indicate how many characters are waiting to be sent. I can't spot a good way to get that info from the FILE internals. */ #define PENDING_OUTPUT_COUNT(FILE) (1) #endif /* NOT_C_CODE */ /* arch-tag: c7013e7b-6e2e-44f2-ba61-90b6d5e2ea45 (do not change this comment) */