Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
02dfeba8
Commit
02dfeba8
authored
Feb 13, 2008
by
Stefan Monnier
Browse files
(smerge-auto-combine-max-separation): New var.
(smerge-auto-combine): New fun.
parent
78dc87a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
38 deletions
+68
-38
lisp/ChangeLog
lisp/ChangeLog
+7
-2
lisp/smerge-mode.el
lisp/smerge-mode.el
+21
-0
src/ccl.h
src/ccl.h
+1
-1
src/coding.h
src/coding.h
+19
-19
src/font.h
src/font.h
+5
-5
src/lisp.h
src/lisp.h
+15
-11
No files found.
lisp/ChangeLog
View file @
02dfeba8
2008-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
* smerge-mode.el (smerge-auto-combine-max-separation): New var.
(smerge-auto-combine): New fun.
2008-02-12 Juri Linkov <juri@jurta.org>
* startup.el (fancy-startup-screen, normal-splash-screen):
...
...
@@ -6,8 +11,8 @@
* desktop.el (after-init-hook): Set inhibit-startup-screen to t
after reading the desktop.
* progmodes/compile.el (compilation-auto-jump):
Call
compile-goto-error only when compilation-auto-jump-to-first-error
* progmodes/compile.el (compilation-auto-jump):
Call
compile-goto-error only when compilation-auto-jump-to-first-error
is non-nil.
(compilation-scroll-output): Replace :type 'boolean with a choice
that has three options including a third option `first-error'.
...
...
lisp/smerge-mode.el
View file @
02dfeba8
...
...
@@ -297,6 +297,8 @@ Can be nil if the style is undecided, or else:
(
defun
smerge-combine-with-next
()
"Combine the current conflict with the next one."
;; `smerge-auto-combine' relies on the finish position (at the beginning
;; of the closing marker).
(
interactive
)
(
smerge-match-conflict
)
(
let
((
ends
nil
))
...
...
@@ -328,6 +330,25 @@ Can be nil if the style is undecided, or else:
(
dolist
(
m
match-data
)
(
if
m
(
move-marker
m
nil
)))
(
mapc
(
lambda
(
m
)
(
if
m
(
move-marker
m
nil
)))
ends
)))))
(
defvar
smerge-auto-combine-max-separation
2
"Max number of lines between conflicts that should be combined."
)
(
defun
smerge-auto-combine
()
"Automatically combine conflicts that are near each other."
(
interactive
)
(
save-excursion
(
goto-char
(
point-min
))
(
while
(
smerge-find-conflict
)
;; 2 is 1 (default) + 1 (the begin markers).
(
while
(
save-excursion
(
smerge-find-conflict
(
line-beginning-position
(
+
2
smerge-auto-combine-max-separation
))))
(
forward-line
-1
)
;Go back inside the conflict.
(
smerge-combine-with-next
)
(
forward-line
1
)
;Move past the end of the conflict.
))))
(
defvar
smerge-resolve-function
(
lambda
()
(
error
"Don't know how to resolve"
))
"Mode-specific merge function.
...
...
src/ccl.h
View file @
02dfeba8
...
...
@@ -117,7 +117,7 @@ EXFUN (Fccl_program_p, 1);
#define CHECK_CCL_PROGRAM(x) \
do { \
if (NILP (Fccl_program_p (x))) \
x =
wrong_type_argument (Qcclp, (x)); \
wrong_type_argument (Qcclp, (x)); \
} while (0);
#endif
/* EMACS_CCL_H */
...
...
src/coding.h
View file @
02dfeba8
...
...
@@ -161,23 +161,23 @@ enum coding_attr_index
/* Macros to access an element of an attribute vector. */
#define CODING_ATTR_BASE_NAME(attrs) A
REF
(attrs, coding_attr_base_name)
#define CODING_ATTR_TYPE(attrs) A
REF
(attrs, coding_attr_type)
#define CODING_ATTR_CHARSET_LIST(attrs) A
REF
(attrs, coding_attr_charset_list)
#define CODING_ATTR_MNEMONIC(attrs) A
REF
(attrs, coding_attr_mnemonic)
#define CODING_ATTR_DOCSTRING(attrs) A
REF
(attrs, coding_attr_docstring)
#define CODING_ATTR_ASCII_COMPAT(attrs) A
REF
(attrs, coding_attr_ascii_compat)
#define CODING_ATTR_DECODE_TBL(attrs) A
REF
(attrs, coding_attr_decode_tbl)
#define CODING_ATTR_ENCODE_TBL(attrs) A
REF
(attrs, coding_attr_encode_tbl)
#define CODING_ATTR_TRANS_TBL(attrs) A
REF
(attrs, coding_attr_trans_tbl)
#define CODING_ATTR_POST_READ(attrs) A
REF
(attrs, coding_attr_post_read)
#define CODING_ATTR_PRE_WRITE(attrs) A
REF
(attrs, coding_attr_pre_write)
#define CODING_ATTR_DEFAULT_CHAR(attrs) A
REF
(attrs, coding_attr_default_char)
#define CODING_ATTR_FOR_UNIBYTE(attrs) A
REF
(attrs, coding_attr_for_unibyte)
#define CODING_ATTR_FLUSHING(attrs) A
REF
(attrs, coding_attr_flushing)
#define CODING_ATTR_PLIST(attrs) A
REF
(attrs, coding_attr_plist)
#define CODING_ATTR_CATEGORY(attrs) A
REF
(attrs, coding_attr_category)
#define CODING_ATTR_SAFE_CHARSETS(attrs)A
REF
(attrs, coding_attr_safe_charsets)
#define CODING_ATTR_BASE_NAME(attrs) A
SLOT
(attrs, coding_attr_base_name)
#define CODING_ATTR_TYPE(attrs) A
SLOT
(attrs, coding_attr_type)
#define CODING_ATTR_CHARSET_LIST(attrs) A
SLOT
(attrs, coding_attr_charset_list)
#define CODING_ATTR_MNEMONIC(attrs) A
SLOT
(attrs, coding_attr_mnemonic)
#define CODING_ATTR_DOCSTRING(attrs) A
SLOT
(attrs, coding_attr_docstring)
#define CODING_ATTR_ASCII_COMPAT(attrs) A
SLOT
(attrs, coding_attr_ascii_compat)
#define CODING_ATTR_DECODE_TBL(attrs) A
SLOT
(attrs, coding_attr_decode_tbl)
#define CODING_ATTR_ENCODE_TBL(attrs) A
SLOT
(attrs, coding_attr_encode_tbl)
#define CODING_ATTR_TRANS_TBL(attrs) A
SLOT
(attrs, coding_attr_trans_tbl)
#define CODING_ATTR_POST_READ(attrs) A
SLOT
(attrs, coding_attr_post_read)
#define CODING_ATTR_PRE_WRITE(attrs) A
SLOT
(attrs, coding_attr_pre_write)
#define CODING_ATTR_DEFAULT_CHAR(attrs) A
SLOT
(attrs, coding_attr_default_char)
#define CODING_ATTR_FOR_UNIBYTE(attrs) A
SLOT
(attrs, coding_attr_for_unibyte)
#define CODING_ATTR_FLUSHING(attrs) A
SLOT
(attrs, coding_attr_flushing)
#define CODING_ATTR_PLIST(attrs) A
SLOT
(attrs, coding_attr_plist)
#define CODING_ATTR_CATEGORY(attrs) A
SLOT
(attrs, coding_attr_category)
#define CODING_ATTR_SAFE_CHARSETS(attrs)A
SLOT
(attrs, coding_attr_safe_charsets)
/* Return the name of a coding system specified by ID. */
...
...
@@ -241,7 +241,7 @@ enum coding_attr_index
spec = CODING_SYSTEM_SPEC (x); \
} \
if (NILP (spec)) \
x =
wrong_type_argument (Qcoding_system_p, (x)); \
wrong_type_argument (Qcoding_system_p, (x)); \
} while (0)
...
...
@@ -258,7 +258,7 @@ enum coding_attr_index
id = CODING_SYSTEM_ID (x); \
} \
if (id < 0) \
x =
wrong_type_argument (Qcoding_system_p, (x)); \
wrong_type_argument (Qcoding_system_p, (x)); \
} while (0)
...
...
src/font.h
View file @
02dfeba8
...
...
@@ -233,17 +233,17 @@ struct font_bitmap
/* Check macros for various font-related objects. */
#define CHECK_FONT(x) \
do { if (! FONTP (x))
x =
wrong_type_argument (Qfont, x); } while (0)
do { if (! FONTP (x)) wrong_type_argument (Qfont, x); } while (0)
#define CHECK_FONT_SPEC(x) \
do { if (! FONT_SPEC_P (x))
x =
wrong_type_argument (Qfont, x); } while (0)
do { if (! FONT_SPEC_P (x)) wrong_type_argument (Qfont, x); } while (0)
#define CHECK_FONT_ENTITY(x) \
do { if (! FONT_ENTITY_P (x))
x =
wrong_type_argument (Qfont, x); } while (0)
do { if (! FONT_ENTITY_P (x)) wrong_type_argument (Qfont, x); } while (0)
#define CHECK_FONT_OBJECT(x) \
do { if (! FONT_OBJECT_P (x))
x =
wrong_type_argument (Qfont, x); } while (0)
do { if (! FONT_OBJECT_P (x)) wrong_type_argument (Qfont, x); } while (0)
#define CHECK_FONT_GET_OBJECT(x, font) \
do { \
if (! FONT_OBJECT_P (x))
x =
wrong_type_argument (Qfont, x); \
if (! FONT_OBJECT_P (x)) wrong_type_argument (Qfont, x); \
if (! XSAVE_VALUE (x)->pointer) error ("Font already closed"); \
font = XSAVE_VALUE (x)->pointer; \
} while (0)
...
...
src/lisp.h
View file @
02dfeba8
...
...
@@ -588,13 +588,17 @@ extern size_t pure_size;
/* Convenience macros for dealing with Lisp arrays. */
#define A
REF
(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
#define A
SLOT
(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
#define ASIZE(ARRAY) XVECTOR ((ARRAY))->size
/* The IDX==IDX tries to detect when the macro argument is side-effecting. */
/* The IDX==IDX checks that the macro argument is not side-effecting. */
#define AREF(ARRAY, IDX) \
(eassert ((IDX) == (IDX)), \
eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
ASLOT (ARRAY, (IDX)))
#define ASET(ARRAY, IDX, VAL) \
(eassert ((IDX) == (IDX)), \
eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
A
REF
((ARRAY), (IDX)) = (VAL))
A
SLOT
((ARRAY), (IDX)) = (VAL))
/* Convenience macros for dealing with Lisp strings. */
...
...
@@ -686,12 +690,12 @@ struct Lisp_Cons
#define CAR(c) \
(CONSP ((c)) ? XCAR ((c)) \
: NILP ((c)) ? Qnil \
: wrong_type_argument (Qlistp, (c)))
:
(
wrong_type_argument (Qlistp, (c))
, Qnil)
)
#define CDR(c) \
(CONSP ((c)) ? XCDR ((c)) \
: NILP ((c)) ? Qnil \
: wrong_type_argument (Qlistp, (c)))
:
(
wrong_type_argument (Qlistp, (c))
, Qnil)
)
/* Take the car or cdr of something whose type is not known. */
#define CAR_SAFE(c) \
...
...
@@ -1090,25 +1094,25 @@ struct Lisp_Hash_Table
/* Value is the key part of entry IDX in hash table H. */
#define HASH_KEY(H, IDX) A
REF
((H)->key_and_value, 2 * (IDX))
#define HASH_KEY(H, IDX) A
SLOT
((H)->key_and_value, 2 * (IDX))
/* Value is the value part of entry IDX in hash table H. */
#define HASH_VALUE(H, IDX) A
REF
((H)->key_and_value, 2 * (IDX) + 1)
#define HASH_VALUE(H, IDX) A
SLOT
((H)->key_and_value, 2 * (IDX) + 1)
/* Value is the index of the next entry following the one at IDX
in hash table H. */
#define HASH_NEXT(H, IDX) A
REF
((H)->next, (IDX))
#define HASH_NEXT(H, IDX) A
SLOT
((H)->next, (IDX))
/* Value is the hash code computed for entry IDX in hash table H. */
#define HASH_HASH(H, IDX) A
REF
((H)->hash, (IDX))
#define HASH_HASH(H, IDX) A
SLOT
((H)->hash, (IDX))
/* Value is the index of the element in hash table H that is the
start of the collision list at index IDX in the index vector of H. */
#define HASH_INDEX(H, IDX) A
REF
((H)->index, (IDX))
#define HASH_INDEX(H, IDX) A
SLOT
((H)->index, (IDX))
/* Value is the size of hash table H. */
...
...
@@ -2252,7 +2256,7 @@ extern unsigned long cons_to_long P_ ((Lisp_Object));
extern
void
args_out_of_range
P_
((
Lisp_Object
,
Lisp_Object
))
NO_RETURN
;
extern
void
args_out_of_range_3
P_
((
Lisp_Object
,
Lisp_Object
,
Lisp_Object
))
NO_RETURN
;
extern
Lisp_Object
wrong_type_argument
P_
((
Lisp_Object
,
Lisp_Object
))
NO_RETURN
;
extern
void
wrong_type_argument
P_
((
Lisp_Object
,
Lisp_Object
))
NO_RETURN
;
extern
void
store_symval_forwarding
P_
((
Lisp_Object
,
Lisp_Object
,
Lisp_Object
,
struct
buffer
*
));
extern
Lisp_Object
do_symval_forwarding
P_
((
Lisp_Object
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment